一次控制檔案損壞後的恢復經歷

season0891發表於2008-12-23
一次在沒有備份的情況下成功恢復控制檔案的經歷: 由於開發伺服器的安裝完成後並沒有作任何備份。 當oracle連線出現ora-00205:的錯誤。檢視alert_orcl.log 中提示:找到相應的trc檔案。 ORA-00600: internal error code, arguments: [999], [], [], [], [], [], [], [] 一些相關的資料並不是很能夠解決問題。於是嘗試重新建立新的控制檔案 來恢復oracle . oracle的當前狀態 noarchivelog. root@mylocalhost$du -h redo01.log 101 M 1.重新生成控制檔案: create controlfile reuse database "orcl" noresetlogs noarchivelog maxlogfiles 16 maxlogmembers 3 maxdatafiles 100 maxinstances 8 maxloghistory 454 logfile group 1('/opt/oracle/oradata/orcl/redo01.log') size 100m, group 1('/opt/oracle/oradata/orcl/redo02.log') size 100m, group 1('/opt/oracle/oradata/orcl/redo03.log') size 100m datafile '/opt/oracle/oradata/ORCL/cwmlite01.dbf', '/opt/oracle/oradata/ORCL/indx01.dbf', '/opt/oracle/oradata/ORCL/users01.dbf', '/opt/oracle/oradata/ORCL/drsys01.dbf', '/opt/oracle/oradata/ORCL/odm01.dbf', '/opt/oracle/oradata/ORCL/tools01.dbf', '/opt/oracle/oradata/ORCL/xdb01.dbf', '/opt/oracle/oradata/ORCL/example01.dbf', '/opt/oracle/oradata/ORCL/system01.dbf', '/opt/oracle/oradata/ORCL/undotbs01.dbf' CHARACTER SET ZHS16GBK; 2.shutdown immediate 3.startup mount. ORA-01571: redo version 9.2.0.0.0 incompatible with ORACLE version 8.1.0.0.0 SQL>show parameter compatible 8.1.0 由於oracle9i啟動是從initorcl.ora檔案中讀取引數,修改 compatible=9.2.0.0.0 4.startup SQL> startup; ORACLE instance started. Total System Global Area 1125193868 bytes Fixed Size 452748 bytes Variable Size 486539264 bytes Database Buffers 637534208 bytes Redo Buffers 667648 bytes Database mounted. ORA-01113: file 1 needs media recovery ORA-01110: data file 1: '/opt/oracle/oradata/ORCL/system01.dbf' 5.恢復工作 SQL>recover database 或者 SQL>recover database using backup controlfile until cancel 6.開啟資料庫 SQL>alter databae open;
如果在建立控制檔案的時候size 101M 則會出現錯誤。後來修改為100m則問題解決 。 錯誤提示如下: ERROR at line 1: ORA-01503: CREATE CONTROLFILE failed ORA-01163: SIZE clause indicates 20480 (blocks), but should match header 204800 ORA-01517: log member: '/opt/oracle/oradata/ORCL/redo01.log'

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-520948/,如需轉載,請註明出處,否則將追究法律責任。

相關文章