Wednesday, December 12, 2012

Solving "ORA-00210: cannot open the specified control file" Missing Control File in Oracle 11g



Missing control file in Oracle DB 11g

Trying to do some practices as we used in 10g, trying to start the db after restoring a missing control file, so we remove the main control file in datafiles directory and try to shutdown the database, In 10g the database closed with no errors, but in 11g it generates the following ORA-00210 error.

Note that also in 10g there are 3 control file under the datafiles directory but in 11g it has only 2 control files, one with the datafiles and the other located under the default flash recovery area (fast recovery area in 11g :) )

So here are the steps (11g remember)
----
SQL> shutdown immediate
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/db11g/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
----

As we said Oracle db 11g contains only two control files...
We will return this file and try to remove the one in the flash recovery area

-----
SQL> shutdown immediate
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/flash_recovery_area/db11g/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
-----


It gives the same error, so we cannot try this case in 11g in 10g there 3 files in same directory and it works fine.


Trying to shut it down abort ...(works)

------------------------------------------------
SQL> shutdown abort
ORACLE instance shut down.

SQL> startup
ORACLE instance started.

Total System Global Area  849530880 bytes
Fixed Size                  1339824 bytes
Variable Size             587206224 bytes
Database Buffers          255852544 bytes
Redo Buffers                5132288 bytes
ORA-00205: error in identifying control file, check alert log for more info
------------------------------------------------


you will find these 3 lines

------
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/flash_recovery_area/db11g/control02.ctl'
ORA-27037: unable to obtain file status
------

So it tells that the control files control02.ctl is missing and it gives its location

So
continuing as 10g practice
 
1. get the control files name and locations
2. copy the missing one and rename it to appropriate name
3. start the database or open it as needed

> show parameter control_files
> copy from os Level
> select status from v$instance;
> alter database mount;
> alter database open;
 
Database opened

No comments: