ORA-00205: error in identifying control file, check alert log for more info
当三个控制文件都已损坏,又没有控制文件的备份,我们只能采取重建控制文件的做法。
SQL> startup nomount ORACLE instance started. Total System Global Area 268435456 bytes Fixed Size 1266968 bytes Variable Size 88083176 bytes Database Buffers 176160768 bytes Redo Buffers 2924544 bytes
SQL> create controlfile reuse database woody noresetlogs archivelog 2 LOGFILE 3 GROUP 1 '/u01/app/oracle/oradata/woody/redo01.log', 4 GROUP 2 '/u01/app/oracle/oradata/woody/redo02.log', 5 GROUP 3 '/u01/app/oracle/oradata/woody/redo03.log' 6 DATAFILE 7 '/u01/app/oracle/oradata/woody/sysaux01.dbf', 8 '/u01/app/oracle/oradata/woody/system01.dbf', 9 '/u01/app/oracle/oradata/woody/UNDOTBS01.dbf' 10 CHARACTER SET ZHS16GBK 11 ; Control file created. 成功地重建控制文件后,我们尝试着打开数据库,但系统报错,提示需要进行介质恢复。
SQL> conn /as sysdba; Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 268435456 bytes Fixed Size 1266968 bytes Variable Size 88083176 bytes Database Buffers 176160768 bytes Redo Buffers 2924544 bytes Database mounted. ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/u01/app/oracle/oradata/woody/system01.dbf'
SQL> recover datafile '/u01/app/oracle/oradata/woody/system01.dbf'; Media recovery complete. SQL> recover datafile '/u01/app/oracle/oradata/woody/UNDOTBS01.dbf'; Media recovery complete. SQL> recover datafile '/u01/app/oracle/oradata/woody/sysaux01.dbf'; Media recovery complete.
介质恢复后,重新打开数据库,提示日志文件也需恢复。 SQL> recover database until cancel; 日志已恢复。 控制文件、数据文件、日志文件全部恢复后,将三种文件同步,并打开数据库,成功地完成了数据库的恢复工作。 SQL> alter database open resetlogs; 数据库已更改。
在做了alter database open resetlogs;会把online redelog file清空,数据文件丢失.所以这个时候要做一个全备份。