Saturday, April 27, 2019

Recover database after loss of control file

I lost the control file and when trying to start the database I am getting the error below:

SQL> startup
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size                  8798312 bytes
Variable Size             339742616 bytes
Database Buffers          486539264 bytes
Redo Buffers                3780608 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL> 



You can see that the error is there in alert log as well.

2019-04-27T07:29:30.006425-04:00
ALTER DATABASE   MOUNT
2019-04-27T07:29:30.781317-04:00
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl12c/control01.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
ORA-205 signalled during: ALTER DATABASE   MOUNT...
2019-04-27T07:29:30.932158-04:00
Errors in file /u01/app/oracle/diag/rdbms/orcl12c/orcl12c/trace/orcl12c_m000_12917.trc:
ORA-00202: control file: '/u01/app/oracle/oradata/orcl12c/control01.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
2019-04-27T07:29:32.069723-04:00
Checker run found 1 new persistent data failures


Solution: copying the second controlfile over original location and calling it control01.ctl and starting database fixed the issue.

location of the second control file is in the alert log.

  control_files            = "/u01/app/oracle/oradata/orcl12c/control01.ctl"
  control_files            = "/u01/app/oracle/fast_recovery_area/orcl12c/control02.ctl"



$ cp /u01/app/oracle/fast_recovery_area/orcl12c/control02.ctl /u01/app/oracle/oradata/orcl12c/control01.ctl

SQL> startup
ORACLE instance started.

Total System Global Area  838860800 bytes
Fixed Size                  8798312 bytes
Variable Size             339742616 bytes
Database Buffers          486539264 bytes
Redo Buffers                3780608 bytes
Database mounted.
Database opened.
SQL> 


Tuesday, March 12, 2019

The program cannot open the required dialog box because it cannot determine whether the computer named "BLABLA" is joined to a domain. Close this message, and try again.

I am connected to the sql server database from my machine using SQL Management Studio and wanted to add a user with Windows Authentication, but as soon as I click on Search button the session is taking some time and finally reporting back with an error as below:

The error message is "The program cannot open the required dialog box because it cannot determine whether the computer "BLABLA" named is joined to a domain. Close this message, and try again."

There is a workaround for this issue and a fix.

Workaround can be done from your client SQL Server management studio, but for fix you need to access sql server and make change in firewall.

Workaround:
Use the command like to create the user from SQL Server Management Studio and the example is as below:

create login "MYDOMAIN\test_user" from windows;
go

After this you should be able to refresh the Login view and grant required permissions to user.


Fix:
SQL Server Management Studio requires port 445 inbound to perform this search. So add that port to inbound rules and enable the rule to get it fixed.


Other Checks Done:
I have checked that the server is joined to domain and that can be done from cmd or from server properties

echo %userdomain%