1. 程式人生 > >ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr]問題處理

ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr]問題處理

伺服器斷電,異常關機後,重啟報錯ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr]

資料庫執行環境是Linux上執行的ORACLE11G

--嘗試啟動資料庫例項,報錯如下:

SQL> startup
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 624952200 bytes
Database Buffers 436207616 bytes
Redo Buffers 5517312 bytes
Database mounted.
ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1],


[89], [32294], [32511], [], [], [], [], [], [], []

--此時資料庫啟動到mount狀態,嘗試以resetlogs方式open資料庫,也無法開啟
SQL> select open_mode from v$database;

OPEN_MODE
--------------------
MOUNTED

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery

--嘗試recover後,開啟資料庫,仍然報相同錯誤
SQL> recover database;
Media recovery complete.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1],
[89], [32294], [32511], [], [], [], [], [], [], []

查詢告警日誌altertrace檔案,對照上網查詢錯誤,獲取報錯原因:
由於伺服器異常短電,導致LGWR寫聯機日誌檔案時失敗,下次重新啟動資料庫時,需要做例項級恢復,而又無法從聯機日誌檔案裡獲取到這些redo資訊,因為上次斷電時,寫日誌失敗了

--檢視當前日誌檔案情況,從以下查詢結果可以看到當前日誌組為89
SQL> select group#,sequence#,status,first_time,next_change# from v$log;

GROUP# SEQUENCE# STATUS FIRST_TIM NEXT_CHANGE#
---------- ---------- ---------------- --------- ------------
1 88 INACTIVE 16-JUN-16 3012456638
2 89 CURRENT 16-JUN-16 2.8147E+14
3 87 INACTIVE 16-JUN-16 3012450709
4 1 INACTIVE 13-JUN-16 3011785042
5 0 UNUSED 0

--恢復資料庫,指定redo02.log日誌
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 3012500746 generated at 06/16/2016 22:40:33 needed for thread
1
ORA-00289: suggestion :
/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2016_06_16/o1_mf_1_89_%u_.arc
ORA-00280: change 3012500746 for thread 1 is in sequence #89


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/app/oracle/oradata/orcl/redo02.log(自己資料庫的日誌檔案路徑)
Log applied.
Media recovery complete.

--恢復完成後,再次可以正常開啟資料庫,重啟資料庫正常。

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;

Database altered.