1,Control File(Controlfile)Loss recovery
Based on the control file's compound multi-path nature, there are two types of loss: one is the damage or loss of a control file, and the other is the loss of all control files. In the first case, you only need to copy the control file to the path of the corrupt or lost control file. In the second case, backup information is required to restore the control file or manually recreate the control file.
Loss of a single control file judgment and recovery.
The database cannot be shut down normally, because it must be updated to the control file when it is closed.ScnNo.
SQL> shutdown immediate
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/DBData/oradata/WWL/control02.ctl'
ORA-27041: unable to open file
LinuxError: 2: No such file or directory
Additionalinformation: 3
The database must be forcibly closed.
SQL> shutdown abort;
Oracleinstance shut down.
An error occurred while verifying the control file when starting the database. Check the alarm log file.
SQL> startup
ORACLEinstance started.
TotalSystem Global Area 285212672 bytes
FixedSize 1218968 bytes
VariableSize 104859240 bytes
DatabaseBuffers 171966464 bytes
RedoBuffers 7168000 bytes
ORA-00205: error in identifying control file, check alert log for more info
View the alarm log. The system prompts that the alarm cannot be found.Controlfile2
Fri Jun 2012
Errors infile/DBSoft/admin/WWL/udump/wwl_ora_4816.trc:
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/DBData/oradata/WWL/control02.ctl'
ORA-27041: unable to open file
LinuxError: 2: No such file or directory
From the above information, we can conclude that the database cannot be started or shut down due to the loss of the control file. What we need to do is to restore the control file, because we know that the control file has repeated multi-path attributes, three control files are generated by default. The control file is displayed in the log.2Lost, cannot be found, we can control the file1And3To restore2.
4.1Recover corrupt control files based on normal control files
1View the path of the Control File
SQL> show parameter control_files
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_files string/DBSoft/oradata/WWL/control01.ctl,/DBData/oradata/WWL/control02.ctl,/DBData/oradata/WWL/control03.ctl
SQL>
We can see from the above that the database has three control files, one of which is stored in/DBSoftIn bytesOradata/wwl/Directory, the other two control files exist/DBDataDirectory/Oradata/wwl/From the above information, we can obtainControl02.ctlDatabase faults are caused by the loss of control files.
2Check whether the control file does not exist or is damaged.
[Oracle @ wwldb WWL] $ cd/DBData/oradata/WWL/
[Oracle @ wwldb WWL] $ ll
Total 0
[Oracle @ wwldb WWL] $
It's a strange thing. Why is there no control file in this directory? Check whether the control file exists.
[Oracle @ wwldb WWL] $ cd/DBSoft/oradata/WWL/
[Oracle @ wwldb WWL] $ ls
Control01.ctl
Very lucky,Controlfile1Still exist, so that we can passControlfile1To restoreControlfile2And3.
3, Shut down the database
SQL> shutdown abort
ORACLE instance shut down.
SQL>
4Recover lost control files
[Oracle @ wwldbWWL] $ ls
Control01.ctl
[Oracle @ wwldbWWL] $ pwd
/DBSoft/oradata/WWL
[Oracle @ wwldbWWL] $ ls
Control01.ctl
[Oracle @ wwldbWWL] $ cp control01.ctl/DBData/oradata/WWL/control02.ctl
[Oracle @ wwldbWWL] $ cp control01.ctl/DBData/oradata/WWL/control03.ctl
[Oracle @ wwldbWWL] $ ll/DBData/oradata/WWL/
Total13792
-Rw-r ----- 1 oracle oinstall 7061504 Jun 22 control02.ctl
-Rw-r ----- 1 oracle oinstall 7061504 Jun 22 control03.ctl
[Oracle @ wwldb WWL] $
2,Start Database
SQL> startup
ORACLEinstance started.
Total SystemGlobal Area285212672 bytes
FixedSize1218968 bytes
VariableSize104859240 bytes
DatabaseBuffers171966464 bytes
RedoBuffers7168000 bytes
Databasemounted.
Databaseopened.
SQL>
4.2All control files are lost.
Loss of a single control file judgment and recovery.
The database cannot be shut down normally, because it must be updated to the control file when it is closed.ScnNo.
SQL> shutdown immediate
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/DBSoft/oradata/WWL/control01.ctl'
ORA-27041: unable to open file
LinuxError: 2: No such file or directory
Additionalinformation: 3
The database must be forcibly closed.
SQL> shutdown abort;
ORACLEinstance shut down.
An error occurred while verifying the control file when starting the database. Check the alarm log file.
SQL> startup
ORACLEinstance started.
TotalSystem Global Area 285212672 bytes
FixedSize 1218968 bytes
VariableSize 104859240 bytes
DatabaseBuffers 171966464 bytes
RedoBuffers 7168000 bytes
ORA-00205: error in identifying control file, check alert log for more info
View the alarm log. The system prompts that the alarm cannot be found.Controlfile1
Fri Jun 22 13:16:07 2012
Errors in file/DBSoft/admin/WWL/udump/wwl_ora_5104.trc:
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/DBSoft/oradata/WWL/control01.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
PassRMANTo restore the control file:
1,Force start the databaseNomountStatus
SQL> startupforce nomount;
ORACLE instancestarted.
Total SystemGlobal Area 285212672 bytes
Fixed Size 1218968 bytes
VariableSize 109053544 bytes
Database Buffers 167772160 bytes
RedoBuffers 7168000 bytes
SQL> exit
2,RunRestoreControl file recovery
RMAN> restore controlfile;
3,Open Database
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
Related reading:
Exploring the RMAN_01 concept of Oracle
Explore the basic use of RMAN_02 in Oracle
Explore Oracle-based RMAN_03 non-consistent backup
Explore Oracle-based RMAN_04 non-consistent backup
Explore RMAN_05 Incremental Backup in Oracle
Exploring Oracle's RMAN_06 backup policy
Explore Oracle RMAN_07 restoration of single data file loss
Explore Oracle RMAN_07 recovery of whole business tablespace loss
Explore Oracle RMAN_07 disk corruption data loss recovery
Explore Oracle RMAN_07 recovery of all database files lost
Explore Oracle RMAN_07 redo log redu file loss recovery
Explore Oracle RMAN_07 parameter file loss recovery
Explore Oracle RMAN_07 control file loss recovery
Explore Oracle RMAN_07 system tablespace loss recovery