特殊恢复ORA-00600 kcratr_nab_less_than_odr
故障原因:由于中午公司突然断电导致的测试服务器一台机器down机,然后重新启动的时候oracle startup不了了,
随之出现600错误
系统:Solaris11 amd64
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
SQL> ALTER DATABASE OPEN; #open数据库
ALTER DATABASE OPEN
*
第 1 行出现错误: //不能open数据库,抛出错误600
ORA-00600: 内部错误代码, 参数: [kcratr_nab_less_than_odr], [1], [99189],
[43531], [43569], [], [], [], [], [], [], []
alert log记录如下:
alter database open
Wed Jul 24 08:46:25 2013
Beginning crash recovery of 1 threads
parallel recovery started with 3 processes
Wed Jul 24 08:46:25 2013
Started redo scan
Wed Jul 24 08:46:26 2013
Completed redo scan
read 2521 KB redo, 0 data blocks need recovery
Errors in file /oracle/diag/rdbms/aaa/aaa/trace/aaa_ora_1873.trc (incident=9781): //错误事件在这个地方,要求您移步了意思是!!!
ORA-00600: 内部错误代码, 参数: [kcratr_nab_less_than_odr], [1], [111], [20030], [20227], [], [], [], [], [], [], []
cat /oracle/diag/rdbms/aaa/aaa/trace/aaa_ora_1873.trc文件结果如下
WARNING! Crash recovery of thread 1 seq 111 is ending at redo block 20030 but should not have ended before
redo block 20227 //此处的意思是数据库需要恢复rba到20227,但是只找到thread 1 seq 111能恢复rba到20030 所以数据库无法启动
DDE: Problem Key 'ORA 600 [kcratr_nab_less_than_odr]' was flood controlled (0x2) (incident: 9781)
ORA-00600: 内部错误代码, 参数: [kcratr_nab_less_than_odr], [1], [111], [20030], [20227], [], [], [], [], [], [], []
既然是直接恢复不了那就
SQL> RECOVER DATABASE; #同步redo日志的时间点
ORA-00283: 恢复会话因错误而取消
不要求恢复
SQL> RECOVER DATABASE UNTIL CANCEL; //不完全恢复
ORA-10879: error signaled in parallel recovery slave
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01152: 文件 1 没有从过旧的备份中还原
ORA-01110: 数据文件 1: '/oracle/oradata/aaa/system01.dbf' //此时感觉好凄凉啊!!!
既然控制文件的记录和rba不配合,然后rba恢复不了,所以决定从ctl文件下手处理此问题
重建控制文件
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/tmp/crlfile.txt';
SQL> SHUTDOWN IMMEDIATE;
ORA-01109: 数据库未打开
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> STARTUP NOMOUNT
ORACLE 例程已经启动。
Total System Global Area 1670221824 bytes
Fixed Size 2361784 bytes
Variable Size 1056966216 bytes
Database Buffers 603979776 bytes
Redo Buffers 6914048 bytes
SQL> !
参考以生成的crl text,编写一下脚本
我的ctlfile.txt内容如下:
此处略去n个字...............
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "aaa" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/oracle/oradata/aaa/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/oracle/oradata/aaa/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/oracle/oradata/aaa/redo03.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/oracle/oradata/aaa/system01.dbf',
'/oracle/oradata/aaa/sysaux01.dbf',
'/oracle/oradata/aaa/undotbs01.dbf',
'/oracle/oradata/aaa/users01.dbf',
'/oracle/oradata/aaa/aaaS.dbf',
'/oracle/oradata/aaa/aaaS_REPORT01.dbf',
'/oracle/oradata/aaa/aaaS_REPORT02.dbf',
'/oracle/oradata/aaa/aaaS_REPORT03.dbf',
'/oracle/oradata/aaa/aaaS_REPORT04.dbf',
'/oracle/oradata/aaa/aaaS_REPORT05.dbf',
'/oracle/oradata/aaa/aaaS_REPORT06.dbf',
'/oracle/oradata/aaa/aaaS_REPORT07.dbf',
'/oracle/oradata/aaa/aaaS_REPORT08.dbf',
'/oracle/oradata/aaa/aaaS_REPORT09.dbf',
'/oracle/oradata/aaa/aaaS_REPORT10.dbf'
CHARACTER SET AL32UTF8
;
此处略去n个字....................
将STARTUP NOMOUNT(不包扩本身)字符后边的全部粘贴,到sqlplus下如下:
SQL> CREATE CONTROLFILE REUSE DATABASE "aaa" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/oracle/oradata/aaa/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/oracle/oradata/aaa/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/oracle/oradata/aaa/redo03.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/oracle/oradata/aaa/system01.dbf',
'/oracle/oradata/aaa/sysaux01.dbf',
'/oracle/oradata/aaa/undotbs01.dbf',
'/oracle/oradata/aaa/users01.dbf',
'/oracle/oradata/aaa/aaaS.dbf',
'/oracle/oradata/aaa/aaaS_REPORT01.dbf',
'/oracle/oradata/aaa/aaaS_REPORT02.dbf',
'/oracle/oradata/aaa/aaaS_REPORT03.dbf',
'/oracle/oradata/aaa/aaaS_REPORT04.dbf',
'/oracle/oradata/aaa/aaaS_REPORT05.dbf',
'/oracle/oradata/aaa/aaaS_REPORT06.dbf',
'/oracle/oradata/aaa/aaaS_REPORT07.dbf',
'/oracle/oradata/aaa/aaaS_REPORT08.dbf',
'/oracle/oradata/aaa/aaaS_REPORT09.dbf',
'/oracle/oradata/aaa/aaaS_REPORT10.dbf'
CHARACTER SET AL32UTF8
; 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
控制文件已创建。
SQL> RECOVER DATABASE;
完成介质恢复。
SQL> alter database open;
数据库已更改。
###############################################
本文属于笔者原创
作者:john
转载请注明出处