联系:手机/微信(+86 17813235971) QQ(107644445)
标题:通过alert日志回顾其他dba oracle异常恢复故障处理以及后续open数据库操作
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
客户有一个数据库故障,是其他工程师进行恢复操作,最后搞不定通过朋友介绍找到我的.我通过分析alert日志,大概追述故障经过
1. 数据库断电之后启动报ORA-01172 ORA-01151错误,直接启动数据库失败,从报错看是由于数据库在open过程中前滚redo日志异常导致
Thu Feb 26 06:48:35 2026 alter database open Beginning crash recovery of 1 threads parallel recovery started with 23 processes Started redo scan Completed redo scan read 73194 KB redo, 37226 data blocks need recovery Thu Feb 26 06:48:49 2026 Started redo application at Thread 1: logseq 869366, block 3 Recovery of Online Redo Log: Thread 1 Group 2 Seq 869366 Reading mem 0 Mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG Thu Feb 26 06:48:50 2026 RECOVERY OF THREAD 1 STUCK AT BLOCK 16938 OF FILE 3 Slave exiting with ORA-1172 exception Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_p016_4672.trc: ORA-01172: recovery of thread 1 stuck at block 16938 of file 3 ORA-01151: use media recovery to recover block, restore backup if needed Aborting crash recovery due to slave death, attempting serial crash recovery Beginning crash recovery of 1 threads Started redo scan Thu Feb 26 06:49:00 2026 Completed redo scan read 73194 KB redo, 37226 data blocks need recovery Started redo application at Thread 1: logseq 869366, block 3 Thu Feb 26 06:49:10 2026 Recovery of Online Redo Log: Thread 1 Group 2 Seq 869366 Reading mem 0 Mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG RECOVERY OF THREAD 1 STUCK AT BLOCK 16938 OF FILE 3 Aborting crash recovery due to error 1172 Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_9260.trc: ORA-01172: recovery of thread 1 stuck at block 16938 of file 3 ORA-01151: use media recovery to recover block, restore backup if needed Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_9260.trc: ORA-01172: recovery of thread 1 stuck at block 16938 of file 3 ORA-01151: use media recovery to recover block, restore backup if needed ORA-1172 signalled during: alter database open...
2. 尝试recover database报ORA-600 3020、ORA-600 17147、ORA-600 17114、ORA-600 17182等错误,这个报错比较明确是由于redo的block信息和datafile的block不一致,导致实例recover database失败
Thu Feb 26 06:50:54 2026 ALTER DATABASE RECOVER database Media Recovery Start started logmerger process Parallel Media Recovery started with 24 slaves Thu Feb 26 06:50:57 2026 Recovery of Online Redo Log: Thread 1 Group 2 Seq 869366 Reading mem 0 Mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG Thu Feb 26 06:50:59 2026 Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_pr0i_9232.trc (incident=79538): ORA-00600: internal error code, arguments: [3020], [3], [16934], [12599846], [], [], [], [], [], [], [], [] ORA-10567: Redo is inconsistent with data block (file# 3, block# 16934, file offset is 138723328 bytes) ORA-10564: tablespace UNDOTBS1 ORA-01110: data file 3: 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF' ORA-10560: block type 'KTU UNDO BLOCK' Incident details in: d:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_79538\orcl_pr0i_9232_i79538.trc Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_pr0i_9232.trc (incident=79539): ORA-00600: internal error code, arguments: [17114], [0x0381C4C60], [], [], [], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [17182], [0x0381C6948], [], [], [], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [17147], [0x0381C4C60], [], [], [], [], [], [], [], [], [], [] ORA-00600: internal error code, arguments: [3020], [3], [16934], [12599846], [], [], [], [], [], [], [], [] ORA-10567: Redo is inconsistent with data block (file# 3, block# 16934, file offset is 138723328 bytes) ORA-10564: tablespace UNDOTBS1 ORA-01110: data file 3: 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF' ORA-10560: block type 'KTU UNDO BLOCK'
3. 使用隐含参数尝试强制拉库,报ORA-600 2662错误,导致强制拉库没有成功,这个错误相对比较简单,一般修改数据库scn即可
Thu Feb 26 07:04:39 2026 alter database open resetlogs RESETLOGS is being done without consistancy checks. This may result in a corrupted database. The database should be recreated. RESETLOGS after incomplete recovery UNTIL CHANGE 16794964253372 Resetting resetlogs activation ID 1548038913 (0x5c453301) Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc: ORA-00367: checksum error in log file header ORA-00322: log 1 of thread 1 is not current copy ORA-00312: online log 1 thread 1: 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG' Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc: ORA-00367: checksum error in log file header ORA-00322: log 2 of thread 1 is not current copy ORA-00312: online log 2 thread 1: 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG' Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc: ORA-00367: checksum error in log file header ORA-00322: log 3 of thread 1 is not current copy ORA-00312: online log 3 thread 1: 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO03.LOG' Thu Feb 26 07:04:49 2026 Setting recovery target incarnation to 3 Thu Feb 26 07:04:50 2026 Assigning activation ID 1753992092 (0x688bcb9c) Thread 1 opened at log sequence 1 Current log# 1 seq# 1 mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG Successful open of redo thread 1 Thu Feb 26 07:04:50 2026 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Thu Feb 26 07:04:50 2026 SMON: enabling cache recovery Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc (incident=82031): ORA-00600: internal error code, arguments: [2662], [3910], [1642126020], [3910], [1642126047], [4194432] Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc: ORA-00600: internal error code, arguments: [2662], [3910], [1642126020], [3910], [1642126047], [4194432] Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_8712.trc: ORA-00600: internal error code, arguments: [2662], [3910], [1642126020], [3910], [1642126047], [4194432] Error 600 happened during db open, shutting down database USER (ospid: 8712): terminating the instance due to error 600 Thu Feb 26 07:05:00 2026 Instance terminated by USER, pid = 8712 ORA-1092 signalled during: alter database open resetlogs... opiodr aborting process unknown ospid (8712) as a result of ORA-1092
4. 尝试重新open库,数据库open成功但是报ORA-600 kturbleurec1、ORA-600 kcbgtcr_13错误,数据库运行一会就直接crash,这个错误一般是由于undo异常导致
Thu Feb 26 07:09:10 2026 alter database open Beginning crash recovery of 1 threads parallel recovery started with 23 processes Started redo scan Completed redo scan read 0 KB redo, 0 data blocks need recovery Started redo application at Thread 1: logseq 1, block 3, scn 16794964253378 Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0 Mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG Completed redo application of 0.00MB Completed crash recovery at Thread 1: logseq 1, block 3, scn 16794964273379 0 data blocks read, 0 data blocks written, 0 redo k-bytes read Thu Feb 26 07:09:14 2026 Thread 1 advanced to log sequence 2 (thread open) Thread 1 opened at log sequence 2 Current log# 2 seq# 2 mem# 0: D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Thu Feb 26 07:09:14 2026 SMON: enabling cache recovery Successfully onlined Undo Tablespace 2. Dictionary check beginning Dictionary check complete Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Database Characterset is ZHS16GBK No Resource Manager plan active Thu Feb 26 07:09:21 2026 Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_p002_10096.trc (incident=84847): ORA-00600: internal error code, arguments: [kturbleurec1], [], [], [], [], [], [], [], [], [], [], [] Incident details in: d:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_84847\orcl_p002_10096_i84847.trc Thu Feb 26 07:09:21 2026 Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_4600.trc (incident=84831): ORA-00600: internal error code, arguments: [kcbgtcr_13], [], [], [], [], [], [], [], [], [], [], [] Incident details in: d:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_84831\orcl_ora_4600_i84831.trc Errors in file d:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_4600.trc (incident=84832): ORA-00600: internal error code, arguments: [kcbgtcr_13], [], [], [], [], [], [], [], [], [], [], [] Incident details in: d:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_84832\orcl_ora_4600_i84832.trc
客户那边还做了各种恢复尝试,最终依旧无法正常open库,让我这边进行恢复支持.由于客户库不大,而且可以提供数据进行恢复,我让客户发生我数据之后,在本地电脑上进行恢复,下载文件之后,重命名相关路径然后尝试open库
SQL> recover database; ORA-00283: 恢复会话因错误而取消 ORA-16433: 必须以读/写模式打开数据库。
重建控制文件
C:\Users\XFF>sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on 星期五 2月 27 14:36:57 2026 Copyright (c) 1982, 2010, Oracle. All rights reserved. 已连接到空闲例程。 SQL> startup nomount pfile='d:/pfile.txt' ORACLE 例程已经启动。 Total System Global Area 4275781632 bytes Fixed Size 2182592 bytes Variable Size 973079104 bytes Database Buffers 3288334336 bytes Redo Buffers 12185600 bytes SQL> @rectl.sql 控制文件已创建。 SQL> recover database; 完成介质恢复。
尝试open库报ORA-600 2663错误
SQL> alter database open; alter database open * 第 1 行出现错误: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00600: internal error code, arguments: [2663], [3910], [1642323772], [3910], [1642327019], [], [], [], [], [], [], [] 进程 ID: 27296 会话 ID: 14 序列号: 3
使用Patch_SCN工具修改数据库scn

再次尝试open数据库
SQL> recover database; 完成介质恢复。 SQL> alter database open ; 数据库已更改。
alert日志报ORA-600 6856错误
Fri Feb 27 14:40:03 2026 QMNC started with pid=62, OS id=18360 LOGSTDBY: Validating controlfile with logical metadata LOGSTDBY: Validation complete Completed: alter database open Fri Feb 27 14:40:03 2026 Errors in file c:\app\xff\diag\rdbms\orcl\orcl\trace\orcl_p001_21540.trc (incident=15787): ORA-00600: 内部错误代码, 参数: [6856], [0], [479], [], [], [], [], [], [], [], [], [] Incident details in: c:\app\xff\diag\rdbms\orcl\orcl\incident\incdir_15787\orcl_p001_21540_i15787.trc Fri Feb 27 14:40:04 2026 Starting background process CJQ0 Fri Feb 27 14:40:04 2026 CJQ0 started with pid=63, OS id=15592 Doing block recovery for file 8 block 1541549 Resuming block recovery (PMON) for file 8 block 1541549 Block recovery from logseq 3, block 108 to scn 16794965431265 Recovery of Online Redo Log: Thread 1 Group 3 Seq 3 Reading mem 0 Mem# 0: H:\BAIDUNETDISK\20260227\REDO03.LOG Block recovery completed at rba 3.16415.16, scn 3910.1643303906 Fri Feb 27 14:40:04 2026 Trace dumping is performing id=[cdmp_20260227144004] SMON: ignoring slave err,downgrading to serial rollback Errors in file c:\app\xff\diag\rdbms\orcl\orcl\trace\orcl_smon_21696.trc (incident=15723): ORA-00600: 内部错误代码, 参数: [6856], [0], [479], [], [], [], [], [], [], [], [], [] Incident details in: c:\app\xff\diag\rdbms\orcl\orcl\incident\incdir_15723\orcl_smon_21696_i15723.trc ……………… ORACLE Instance orcl (pid = 15) - Error 607 encountered while recovering transaction (3, 10) on object 81310. Errors in file c:\app\xff\diag\rdbms\orcl\orcl\trace\orcl_smon_21696.trc: ORA-00607: 当更改数据块时出现内部错误 ORA-00600: 内部错误代码, 参数: [6856], [0], [479], [], [], [], [], [], [], [], [], [] Process debug not enabled via parameter _debug_enable Trace dumping is performing id=[cdmp_20260227144011] PMON (ospid: 23760): terminating the instance due to error 474
该错误是undo异常引起,屏蔽掉异常undo之后,正常open,并顺利导出所有数据,完成本次恢复任务















