ORA-00600[kcratr_nab_less_than_odr]解决方案
Mar252013
今天,有网友遇到ORA-00600[kcratr_nab_less_than_odr]错误,这个错误在metalink上没有相关的描述,网友的描述是异常关闭虚拟机,之后再用数据库的时候就起不来,报ORA-00600[kcratr_nab_less_than_odr]错误,在要来告警日至和trace文件后,发现告警日至记录以下错误信息:
alter database open Beginning crash recovery of 1 threads Started redo scan Completed redo scan read 226 KB redo, 81 data blocks need recovery Errors in file /u01/app/oracle/diag/rdbms/orcl/hyyk/trace/hyyk_ora_4010.trc (incident=6155): ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], [] Incident details in: /u01/app/oracle/diag/rdbms/orcl/hyyk/incident/incdir_6155/hyyk_ora_4010_i6155.trc Aborting crash recovery due to error 600 Errors in file /u01/app/oracle/diag/rdbms/orcl/hyyk/trace/hyyk_ora_4010.trc: ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], [] Errors in file /u01/app/oracle/diag/rdbms/orcl/hyyk/trace/hyyk_ora_4010.trc: ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], [] ORA-600 signalled during: alter database open
trace文件记录以下错误信息:
WARNING! Crash recovery of thread 1 seq 6 is ending at redo block 37640 but should not have ended before redo block 38119 *** 2013-03-19 17:05:45.841 Incident 6155 created, dump file: /u01/app/oracle/diag/rdbms/orcl/hyyk/incident/incdir_6155/hyyk_ora_4010_i6155.trc ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [kcratr_nab_less_than_odr], [1], [6], [37640], [38119], [], [], [], [], [], [], []
从trace文件看,数据库需要恢复到rba 38119,可是由于异常关闭数据库导致数据库只能恢复到rba 37640,虽然这个问题在metalink上没有找到相关资料,但是在程飞(惜分飞)的博客上找到了解决方法,如下:
- 重建控制文件
SQL> ALTER DATABASE BACKUP CONTROLFILE TOTRACE AS'D:/1.TXT'; 数据库已更改。 SQL> SHUTDOWN IMMEDIATE; ORA-01109: 数据库未打开 已经卸载数据库。 ORACLE 例程已经关闭。 SQL> STARTUP NOMOUNT; ORACLE 例程已经启动。 Total System GlobalArea 417546240 bytes Fixed Size 2176328 bytes Variable Size 268438200 bytes DatabaseBuffers 138412032 bytes Redo Buffers 8519680 bytes SQL> CREATE CONTROLFILE REUSE DATABASE "DBDMS" NORESETLOGS NOARCHIVELOG 2 MAXLOGFILES 16 3 MAXLOGMEMBERS 3 4 MAXDATAFILES 100 5 MAXINSTANCES 8 6 MAXLOGHISTORY 18688 7 LOGFILE 8 GROUP1 'D:DBDMSLOGREDO01.LOG' SIZE50M BLOCKSIZE 512, 9 GROUP2 'D:DBDMSLOGREDO02.LOG' SIZE50M BLOCKSIZE 512, 10 GROUP3 'D:DBDMSLOGREDO03.LOG' SIZE50M BLOCKSIZE 512 11 DATAFILE 12 'D:DBDMSDATASYSTEM01.DBF', 13 'D:DBDMSDATASYSAUX01.DBF', 14 'D:DBDMSDATARBSG01.DBF', 15 'D:DBDMSDATADATA01.DBF', 16 'D:DBDMSDATAINDX01.DBF', 17 'D:DBDMSDATADATA02.DBF', 18 'D:DBDMSDATADATA03.DBF', 19 'D:DBDMSDATADATA04.DBF', 20 'D:DBDMSDATAINDX02.DBF', 21 'D:DBDMSDATASYSTEM02.DBF' 22 CHARACTERSETZHS16GBK 23 ; 控制文件已创建。
- 继续尝试恢复
SQL> RECOVER DATABASE; 完成介质恢复。
- 打开数据库
SQL> ALTER DATABASEOPEN; 数据库已更改。
如果redo日志损坏,那么就需要进行不完全恢复,第二步改为以下操作:
SQL> RECOVER DATABASE UNTIL CANCEL;
第三步改为以下操作:
SQL> ALTER DATABASE OPEN RESETLOGS;