联系:手机/微信(+86 17813235971) QQ(107644445)
标题:ORACLE 8.1.7 数据库ORA-600 4194故障恢复
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
一个817数据库报ORA-600 4194 无法正常启动
Fri Jul 25 10:49:47 2014 Database mounted in Exclusive Mode. Completed: ALTER DATABASE MOUNT Fri Jul 25 10:49:58 2014 ALTER DATABASE RECOVER database Fri Jul 25 10:49:58 2014 Media Recovery Start Media Recovery Log Recovery of Online Redo Log: Thread 1 Group 2 Seq 3320 Reading mem 0 Mem# 0 errs 0: D:\ORACLE\ORADATA\ORCL\REDO02.LOG Media Recovery Complete Completed: ALTER DATABASE RECOVER database Fri Jul 25 10:50:09 2014 alter database open Beginning crash recovery of 1 threads Fri Jul 25 10:50:09 2014 Thread recovery: start rolling forward thread 1 Recovery of Online Redo Log: Thread 1 Group 2 Seq 3320 Reading mem 0 Mem# 0 errs 0: D:\ORACLE\ORADATA\ORCL\REDO02.LOG Fri Jul 25 10:50:09 2014 Thread recovery: finish rolling forward thread 1 Thread recovery: 0 data blocks read, 0 data blocks written, 3 redo blocks read Crash recovery completed successfully Fri Jul 25 10:50:09 2014 Thread 1 advanced to log sequence 3321 Thread 1 opened at log sequence 3321 Current log# 3 seq# 3321 mem# 0: D:\ORACLE\ORADATA\ORCL\REDO01.LOG Successful open of redo thread 1. Fri Jul 25 10:50:09 2014 SMON: enabling cache recovery Fri Jul 25 10:50:10 2014 Errors in file D:\oracle\admin\ORCL\udump\ORA03216.TRC: ORA-00600: ??????????: [4194], [12], [37], [], [], [], [], [] Fri Jul 25 10:50:10 2014 Recovery of Online Redo Log: Thread 1 Group 3 Seq 3321 Reading mem 0 Mem# 0 errs 0: D:\ORACLE\ORADATA\ORCL\REDO01.LOG Fri Jul 25 10:50:10 2014 SMON: disabling cache recovery Fri Jul 25 10:50:10 2014 ORA-600 signalled during: alter database open
ORA-600 4194这个错误在数据库异常恢复中非常常见,因为库不是很重要,因此就是直接屏蔽掉故障回滚段,然后强制拉库,该库的恢复过程中,也直接使用隐含参数屏蔽回滚段
_corrupted_rollback_segments= RBS0, RBS1, RBS2, RBS3, RBS4, RBS5, RBS6, RBS_HDSYS,数据库依然无法open,进一步分析trace文件
Fri Jul 25 11:26:07 2014 ORACLE V8.1.7.0.0 - Production vsnsta=0 vsnsql=e vsnxtr=3 Windows 2000 Version 5.2 Service Pack 2, CPU type 586 Oracle8i Release 8.1.7.0.0 - Production JServer Release 8.1.7.0.0 - Production Windows 2000 Version 5.2 Service Pack 2, CPU type 586 Instance name: orcl Redo thread mounted by this instance: 1 Oracle process number: 14 Windows thread id: 3648, image: ORACLE.EXE *** SESSION ID:(11.1) 2014-07-25 11:26:07.843 *** 2014-07-25 11:26:07.843 ksedmp: internal or fatal error ORA-00600: ??????????: [4194], [12], [37], [], [], [], [], [] Current SQL statement for this session: update undo$ set name=:2,file#=:3,block#=:4,status$=:5,user#=:6,undosqn=:7,xactsqn=:8, scnbas=:9,scnwrp=:10,inst#=:11,ts#=:12 where us#=:1 ----- Call Stack Trace -----
这里很明显看出来,数据库是在open过程中,update undo$表遭遇到ORA-600 4194,因为该过程需要使用系统回滚段,但是由于其所对应的undo和redo信息不一致,所以无法正常启动数据库.继续读trace文件
Extent Control Header ----------------------------------------------------------------- Extent Header:: spare1: 0 space2: 0 #extents: 5 #blocks: 49 last map 0x00000000 #maps: 0 offset: 4128 Highwater:: 0x00400006 ext#: 0 blk#: 3 ext size: 9 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 Unlocked Map Header:: next 0x00000000 #extents: 5 obj#: 0 flag: 0x40000000 Extent Map ----------------------------------------------------------------- 0x00400003 length: 9 0x0040000c length: 10 0x0040008f length: 10 0x00400099 length: 10 0x004000a3 length: 10 TRN CTL:: seq: 0x003c chd: 0x004e ctl: 0x0050 inc: 0x00000000 nfb: 0x0000 mgc: 0x8002 xts: 0x0068 flg: 0x0001 opt: 2147483646 (0x7ffffffe) uba: 0x00400006.003c.25 scn: 0x0000.009a4009 Version: 0x01 FREE BLOCK POOL:: uba: 0x00000000.003c.24 ext: 0x0 spc: 0x196 uba: 0x00000000.001f.14 ext: 0x1 spc: 0x16f6 uba: 0x00000000.0018.02 ext: 0x4 spc: 0x1f1a uba: 0x00000000.0000.00 ext: 0x0 spc: 0x0 uba: 0x00000000.0000.00 ext: 0x0 spc: 0x0 TRN TBL::
通过这里可以看出来,数据库在启动的时候,使用system undo的block为为0×00400006,使用bbed清除掉该uba记录,让数据库启动的时候重新分配system undo block给数据库执行update undo$使用,数据库open成功
BBED> m /x 0x00000000 File: D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF (0) Block: 2 Offsets: 4188 to 4192 Dba:0x00000000 ------------------------------------------------------------------------ 00000000 3c002400 00009601 00000000 1f001400 0100f616 00000000 18000200 BBED> m /x 0x0000 File: D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF (0) Block: 2 Offsets: 4028 to 4032 Dba:0x00000000 ------------------------------------------------------------------------ 00000000 00000000 3c005000 02800100 68000000 feffff7f 06004000 3c002400
Sat Jul 26 12:09:21 2014 Thread recovery: start rolling forward thread 1 Recovery of Online Redo Log: Thread 1 Group 2 Seq 3326 Reading mem 0 Mem# 0 errs 0: D:\ORACLE\ORADATA\ORCL\REDO02.LOG Sat Jul 26 12:09:21 2014 Thread recovery: finish rolling forward thread 1 Thread recovery: 0 data blocks read, 0 data blocks written, 3 redo blocks read Crash recovery completed successfully Sat Jul 26 12:09:22 2014 Thread 1 advanced to log sequence 3327 Thread 1 opened at log sequence 3327 Current log# 3 seq# 3327 mem# 0: D:\ORACLE\ORADATA\ORCL\REDO01.LOG Successful open of redo thread 1. Sat Jul 26 12:09:22 2014 SMON: enabling cache recovery SMON: enabling tx recovery Sat Jul 26 12:09:39 2014 Completed: alter database open