模擬控制文件受損的修復辦法

 

 

[oracle@dbserver sztech1]$ pwdsql

/oracle/app/oracle/oradata/sztech1oracle

[oracle@dbserver sztech1]$ lsapp

example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbfide

redo01.log redo03.log system01.dbf undotbs01.dbfspa

執行破壞動做,將一個控制文件刪掉。server

[oracle@dbserver sztech1]$ rm -f control01.ctlblog

重啓後就會出錯,如:get

SQLstartup nomountflash

ORACLE instance started.file

Total System Global Area 313860096 bytes

Fixed Size 1336232 bytes

Variable Size 234884184 bytes

Database Buffers 71303168 bytes

Redo Buffers 6336512 bytes

SQL> 1* alter database archivelog

SQL> alter database mount;

alter database mount

*

ERROR at line 1:

ORA-00205: error in identifying control file, check alert log for more info

解決辦法:

將另外一個控制文件複製到丟失的控制文件目錄下

[oracle@dbserver sztech1]$ pwd

/oracle/app/oracle/flash_recovery_area/sztech1

[oracle@dbserver sztech1]$ cp control02.ctl

/oracle/app/oracle/oradata/sztech1/control01.ctl

[oracle@dbserver sztech1]$ cd /oracle/app/oracle/oradata/sztech1

[oracle@dbserver sztech1]$ ls

control01.ctl redo01.log redo03.log system01.dbf undotbs01.dbf

example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf

這時候就能執行成功了

SQL> r

1* alter database mount

Database altered.

相關文章
相關標籤/搜索