If the control file is lost or damaged, the instance is usually aborted. You must perform the following steps:
1. Close the instance (if it is still open ).
2. Copy the existing control file to restore the missing control file. 3. Start the instance.
Lab:
1. view the current control file
Show parameter control_files
2. simulate control file loss failure
! Rm/home/Oracle/control_bak/control03.ctl
Show parameter control_files -- the deleted control file still exists.
3. Trigger the checkpoint operation
Alter system checkpoint;
4. Check the output result of Alert Log
Select * from V $ diag_info;
View in alert
/U01/APP/Oracle/diag/rdbms/orcl/Trace
Adrci -- under an oracle user
Adrci> show homepath
ADR homes:
Diag/rdbms/orcl
Adrci> set homepath diag/rdbms/orcl
Adrci> show homepath
ADR homes:
Diag/rdbms/orcl
Adrci>
Adrci> help show alert
Adrci> show alert-tail 20
-- Error
Errors in file/u01/APP/Oracle/diag/rdbms/orcl/Trace/orcl_m000_22432.trc:
ORA-00210: cannot open the specified control file
......
Linux-x86_64 error: 2: no such file or directory
-- Related error logs
5. Force close the database
[Email protected]> shutdown immediate -- closes the database and reports an error
ORA-00210: cannot open the specified control file
ORA-00202: Control File: '/home/Oracle/control_bak/control03.ctl'
ORA-27041: Unable to open file
Linux-x86_64 error: 2: no such file or directory
Additional information: 3
[Email protected]> shutdown abort
Oracle instance shut down.
[Email protected]> startup -- an error is still reported when the database is started.
Oracle instance started.
Total system global area 839282688 bytes
Fixed size 2257880 bytes
Variable Size 507513896 bytes
Database buffers 327155712 bytes
Redo buffers 2355200 bytes
ORA-00205: Error in identifying control file, check Alert Log for more info
-- Unable to enable database
6. replace another control file with this control file
[[Email protected] control_bak] $ CP/u01/APP/Oracle/oradata/orcl/controlfile/o1_mf_b0fh9927 _. CTL
Control03.ctl
[[Email protected] control_bak] $ ls
Control03.ctl
7. Start the database
[Email protected]> startup
-- The database is successfully started.
Detailed steps for restoring control file faults