Oracle資料庫聯機日誌檔案丟失處理方法(4)

jss001發表於2009-02-12
方法四:修改系統引數方法1、 插入資料SQL>; select * from test;

TEL

----------

1 2 3 4

SQL>; insert into test values(5);

1 row created.

SQL>; commit;

Commit complete.

SQL>;2、 強行關閉

SQL>; shutdown abort ORACLE instance shut down.

SQL>;

3、 手工模擬刪除redo

4、 啟動db

SQL>; startup ORACLE instance started.

Total System Global Area 353862792 bytes

Fixed Size 730248 bytes

Variable Size 285212672 bytes

Database Buffers 67108864 bytes

Redo Buffers 811008 bytes Database mounted.

ORA- 00313: open failed for members of log group 3 of thread 1 ORA-00312: online log 3 thread 1: '/T3/ORACLE/oradata/ORA9/redo03.log'

ORA- 27037: unable to obtain file status SVR4 Error: 2: No such file or directory Additional information: 3 5、 嘗試使用前3中方法中最簡單的SQL>; recover database until cancel;ORA-00279: change 550174 generated at 09/02/2005 16:00:19 needed for thread 1 ORA-00289: suggestion : /T3/ORACLE/arch/1_1.dbf ORA-00280: change 550174 for thread 1 is in sequence #1 Specify log: {;=suggested | filename | AUTO | CANCEL}看來不行6、 修改init.ora,加入一行_allow_resetlogs_corruption=true 7、 啟動with pfile SQL>; startup ORACLE instance started. Total System Global Area 320308312 bytes Fixed Size 730200 bytes Variable Size 285212672 bytes Database Buffers 33554432 bytes Redo Buffers 811008 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL>; host ls /T3/ORACLE/oradata/ORA9/redo* /T3/ORACLE/oradata/ORA9/redo*: No such file or directory SQL>; alter database open resetlogs;Database altered.

SQL>; host ls /T3/ORACLE/oradata/ORA9/redo* /T3/ORACLE/oradata/ORA9/redo01.log /T3/ORACLE/oradata/ORA9/redo02.log /T3/ORACLE/oradata/ORA9/redo03.log 8、 檢驗資料SQL>; select * from test.test;

TEL

----------

1 2 3 4

SQL>;看到了吧,我們前面由於執行了SHUTDOWN ABORT,這時候對資料的修改還沒有儲存到資料檔案中,雖然執行了COMMIT,這個時候還在聯機日誌中,等待CKPT觸發DBWR寫入 DATAFILE,但是這個時候執行了SHUTDOWN ABORT,redo被刪除後,裡面的資訊也就丟了,造成資料丟失9、 備份,去掉那個引數[@more@]

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

相關文章