ORA-16038/ORA-00742: Log read detects lost write in thread
朋友遇到Oracle數據庫的 REDO LOG “寫丟失”,造成數據庫,且無法啟動。
日志如下:redo log 5無法歸檔,並且偵測到“寫丟失”。最終導致Oracle宕機。
Errors in file /u01/app/oracle/diag/rdbmsdbcontrol/GZDBCONTROL/trace/GZDBCONTROL_ora_32198.trc:
ORA-16038: log 5 sequence# 23 cannot be archived
ORA-00742: Log read detects lost write in thread %d sequence %d block %d
ORA-00312: online log 5 thread 1: '/u01/app/oracle/fast_recovery_area/GZDBCONTROL/onlinelog/o1_mf_5_d61ctj3y_.log'
USER (ospid: 32198): terminating the instance due to error 16038
System state dump requested by (instance=1, osid=32198), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbmsdbcontrol/GZDBCONTROL/trace/GZDBCONTROL_diag_32167_20161227110109.trc
Dumping diagnostic data in directory=[cdmp_20161227110109], requested by (instance=1, osid=32198), summary=[abnormal instance termination].
問題原因:
這三種清空都可能導致“寫丟失”發生:操作系統、存儲系統、Oracle內部錯誤。
解決辦法:
使用dump判斷是否真正發生了“寫丟失”。
SQL> alter system dump logfile '/u01/app/oracle/fast_recovery_area/GZDBCONTROL/onlinelog/o1_mf_5_d61ctj3y_.log' validate;
ERROR at line 1:
ORA-00742: Log read detects lost write in thread %d sequence %d block %d
ORA-00334: archived log:
'/u01/app/oracle/fast_recovery_area/GZDBCONTROL/onlinelog/o1_mf_5_d61ctj3y_.log'
從上面dump的結果確認發生了“寫丟失”清空,清空問題redo logfile使其恢復正常歸檔。
SQL> alter database clear unarchived logfile group 5;
按照以上步驟,朋友的Oracle數據庫正常啟動。
最後,不要忘記做一次全備份。
參考:
Database Crashe with ORA-16038/ORA-742 Errors (文檔 ID 2064718.1)
http://docs.oracle.com/cd/E11882_01/server.112/e17766/e0.htm
轉載請注明:
十字螺絲釘
QQ:463725310
site: www.dbhelp.net(有更多更新的內容,歡迎訪問)
http://blog.chinaunix.net/uid/23284114.html
E-MAIL:houora#gmail.com(#請自行替換為@)