标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-01595 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,764)
- DB2 (22)
- MySQL (77)
- Oracle (1,605)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (166)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (69)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (588)
- Oracle安装升级 (97)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (86)
- PostgreSQL (30)
- pdu工具 (6)
- PostgreSQL恢复 (9)
- SQL Server (32)
- SQL Server恢复 (13)
- TimesTen (7)
- 达梦数据库 (3)
- 达梦恢复 (1)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (39)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (22)
-
最近发表
- 文件系统格式化MySQL数据库恢复
- .sstop勒索加密数据库恢复
- 解决一次硬件恢复之后数据文件0kb的故障恢复case
- Error in invoking target ‘libasmclntsh19.ohso libasmperl19.ohso client_sharedlib’问题处理
- ORA-01171: datafile N going offline due to error advancing checkpoint
- linux环境oracle数据库被文件系统勒索加密为.babyk扩展名溯源
- ORA-600 ksvworkmsgalloc: bad reaper
- ORA-600 krccfl_chunk故障处理
- Oracle Recovery Tools恢复案例总结—202505
- ORA-600 kddummy_blkchk 数据库循环重启
- 记录一次asm disk加入到vg通过恢复直接open库的案例
- CHECKDB 发现了 N 个分配错误和 M 个一致性错误
- 达梦数据库dm.ctl文件异常恢复
- Oracle Recovery Tools修复ORA-00742、ORA-600 ktbair2: illegal inheritance故障
- 可能是 tempdb 空间用尽或某个系统表不一致故障处理
- 11.2.0.4库中遇到ORA-600 kcratr_nab_less_than_odr报错
- [MY-013183] [InnoDB] Assertion failure故障处理
- Oracle 19c 202504补丁(RUs+OJVM)-19.27
- Oracle Recovery Tools修复ORA-600 6101/kdxlin:psno out of range故障
- pdu完美支持金仓数据库恢复(KingbaseES)
标签归档:bbed
通过bbed模拟ORA-00607/ORA-00600 4194 故障
在数据库恢复的案例中,遇到system rollback异常的故障算是中彩票了.处理起来比较麻烦,有些情况甚至是无法处理.这里通过试验模拟ORA-00607/ORA-00600[4194].类此的错误在一次银联的数据库恢复中也遇到过,不过当时由于功底不深,理解出现部分误差.
通过bbed模拟ORA-00607/ORA-00600[4194]错误
[oracle@xifenfei ~]$ bbed listfile=list mode=edit password=blockedit BBED: Release 2.0.0.0.0 - Limited Production on Fri Nov 4 22:59:51 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> info File# Name Size(blks) ----- ---- ---------- 1 /u01/oracle/oradata/XFF/system01.dbf 0 2 /u01/oracle/oradata/XFF/undotbs01.dbf 0 3 /u01/oracle/oradata/XFF/sysaux01.dbf 0 4 /u01/oracle/oradata/XFF/users01.dbf 0 5 /u01/oracle/oradata/XFF/datfttuser.dbf 0 BBED> set block 9 BLOCK# 9 BBED> map File: /u01/oracle/oradata/XFF/system01.dbf (1) Block: 9 Dba:0x00400009 ------------------------------------------------------------ Unlimited Undo Segment Header struct kcbh, 20 bytes @0 struct ktech, 72 bytes @20 struct ktemh, 16 bytes @92 struct ktetb[6], 48 bytes @108 struct ktuxc, 104 bytes @4148 struct ktuxe[255], 10200 bytes @4252 ub4 tailchk @8188 BBED> p ktuxc struct ktuxc, 104 bytes @4148 struct ktuxcscn, 8 bytes @4148 ub4 kscnbas @4148 0x0006c75b ub2 kscnwrp @4152 0x0000 struct ktuxcuba, 8 bytes @4156 ub4 kubadba @4156 0x00400012 ub2 kubaseq @4160 0x0037 ub1 kubarec @4162 0x1f sb2 ktuxcflg @4164 1 (KTUXCFSK) ub2 ktuxcseq @4166 0x0037 sb2 ktuxcnfb @4168 1 <==free undo block num ub4 ktuxcinc @4172 0x00000000 sb2 ktuxcchd @4176 34 sb2 ktuxcctl @4178 32 ub2 ktuxcmgc @4180 0x8002 ub4 ktuxcopt @4188 0x7ffffffe struct ktuxcfbp[0], 12 bytes @4192 struct ktufbuba, 8 bytes @4192 ub4 kubadba @4192 0x00400013 <==uba (模拟试验修改为其他uba地址) ub2 kubaseq @4196 0x0037 <==uba sequence ub1 kubarec @4198 0x05 sb2 ktufbext @4200 1 sb2 ktufbspc @4202 7200 struct ktuxcfbp[1], 12 bytes @4204 struct ktufbuba, 8 bytes @4204 ub4 kubadba @4204 0x00000000 ub2 kubaseq @4208 0x0035 ub1 kubarec @4210 0x2a sb2 ktufbext @4212 5 sb2 ktufbspc @4214 3446 struct ktuxcfbp[2], 12 bytes @4216 struct ktufbuba, 8 bytes @4216 ub4 kubadba @4216 0x00000000 ub2 kubaseq @4220 0x0035 ub1 kubarec @4222 0x37 sb2 ktufbext @4224 5 sb2 ktufbspc @4226 1336 struct ktuxcfbp[3], 12 bytes @4228 struct ktufbuba, 8 bytes @4228 ub4 kubadba @4228 0x00000000 ub2 kubaseq @4232 0x0000 ub1 kubarec @4234 0x00 sb2 ktufbext @4236 0 sb2 ktufbspc @4238 0 struct ktuxcfbp[4], 12 bytes @4240 struct ktufbuba, 8 bytes @4240 ub4 kubadba @4240 0x00000000 ub2 kubaseq @4244 0x0000 ub1 kubarec @4246 0x00 sb2 ktufbext @4248 0 sb2 ktufbspc @4250 0 BBED> set dba 0x00400013 DBA 0x00400013 (4194323 1,19) BBED> p ktubh struct ktubh, 26 bytes @20 struct ktubhxid, 8 bytes @20 ub2 kxidusn @20 0x0000 ub2 kxidslt @22 0x0020 ub4 kxidsqn @24 0x00000029 ub2 ktubhseq @28 0x0037 <==uba seq ub1 ktubhcnt @30 0x05 ub1 ktubhirb @31 0x05 ub1 ktubhicl @32 0x00 ub1 ktubhflg @33 0x00 ub2 ktubhidx[0] @34 0x1fe8 ub2 ktubhidx[1] @36 0x1f2c ub2 ktubhidx[2] @38 0x1e70 ub2 ktubhidx[3] @40 0x1db4 ub2 ktubhidx[4] @42 0x1cf8 ub2 ktubhidx[5] @44 0x1c3c BBED> set dba 0x00400012 DBA 0x00400012 (4194322 1,18) BBED> p ktubh struct ktubh, 86 bytes @20 struct ktubhxid, 8 bytes @20 ub2 kxidusn @20 0x0000 ub2 kxidslt @22 0x0020 ub4 kxidsqn @24 0x00000029 ub2 ktubhseq @28 0x0037 ub1 ktubhcnt @30 0x23 ub1 ktubhirb @31 0x23 ub1 ktubhicl @32 0x00 ub1 ktubhflg @33 0x00 ub2 ktubhidx[0] @34 0x1fe8 ………… ub2 ktubhidx[35] @104 0x00b4 BBED> set block 9 BLOCK# 9 BBED> set count 16 COUNT 16 BBED> m /x 12004000 offset 4192 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y File: /u01/oracle/oradata/XFF/system01.dbf (1) Block: 9 Offsets: 4192 to 4207 Dba:0x00400009 ------------------------------------------------------------------------ 12004000 37000500 0100201c 00000000 <32 bytes per line> BBED> p ktuxc struct ktuxc, 104 bytes @4148 struct ktuxcscn, 8 bytes @4148 ub4 kscnbas @4148 0x0006c75b ub2 kscnwrp @4152 0x0000 struct ktuxcuba, 8 bytes @4156 ub4 kubadba @4156 0x00400012 ub2 kubaseq @4160 0x0037 ub1 kubarec @4162 0x1f sb2 ktuxcflg @4164 1 (KTUXCFSK) ub2 ktuxcseq @4166 0x0037 sb2 ktuxcnfb @4168 1 ub4 ktuxcinc @4172 0x00000000 sb2 ktuxcchd @4176 34 sb2 ktuxcctl @4178 32 ub2 ktuxcmgc @4180 0x8002 ub4 ktuxcopt @4188 0x7ffffffe struct ktuxcfbp[0], 12 bytes @4192 struct ktufbuba, 8 bytes @4192 ub4 kubadba @4192 0x00400012 <==uba已经被修改 ub2 kubaseq @4196 0x0037 ub1 kubarec @4198 0x05 sb2 ktufbext @4200 1 sb2 ktufbspc @4202 7200 struct ktuxcfbp[1], 12 bytes @4204 struct ktufbuba, 8 bytes @4204 ub4 kubadba @4204 0x00000000 ub2 kubaseq @4208 0x0035 ub1 kubarec @4210 0x2a sb2 ktufbext @4212 5 sb2 ktufbspc @4214 3446 struct ktuxcfbp[2], 12 bytes @4216 struct ktufbuba, 8 bytes @4216 ub4 kubadba @4216 0x00000000 ub2 kubaseq @4220 0x0035 ub1 kubarec @4222 0x37 sb2 ktufbext @4224 5 sb2 ktufbspc @4226 1336 struct ktuxcfbp[3], 12 bytes @4228 struct ktufbuba, 8 bytes @4228 ub4 kubadba @4228 0x00000000 ub2 kubaseq @4232 0x0000 ub1 kubarec @4234 0x00 sb2 ktufbext @4236 0 sb2 ktufbspc @4238 0 struct ktuxcfbp[4], 12 bytes @4240 struct ktufbuba, 8 bytes @4240 ub4 kubadba @4240 0x00000000 ub2 kubaseq @4244 0x0000 ub1 kubarec @4246 0x00 sb2 ktufbext @4248 0 sb2 ktufbspc @4250 0 BBED> sum apply Check value for File 1, Block 9: current = 0xe686, required = 0xe686
启动数据库
SQL> startup ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1219160 bytes Variable Size 96470440 bytes Database Buffers 213909504 bytes Redo Buffers 7168000 bytes Database mounted. ORA-01092: ORACLE instance terminated. Disconnection forced
alert日志
Fri Nov 4 23:10:37 2011 SMON: enabling cache recovery Fri Nov 4 23:10:37 2011 ARC2: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE ARC0: Becoming the heartbeat ARCH ARC2 started with pid=18, OS id=21535 Fri Nov 4 23:10:38 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_21529.trc: ORA-00600: internal error code, arguments: [4194], [35], [6], [], [], [], [], [] Fri Nov 4 23:10:41 2011 Doing block recovery for file 1 block 18 Block recovery from logseq 2, block 48668 to scn 458453 Fri Nov 4 23:10:41 2011 Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0 Mem# 0 errs 0: /u01/oracle/oradata/XFF/redo01.log Block recovery stopped at EOT rba 2.48670.16 Block recovery completed at rba 2.48670.16, scn 0.458451 Doing block recovery for file 1 block 9 Block recovery from logseq 2, block 48668 to scn 458450 Fri Nov 4 23:10:41 2011 Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0 Mem# 0 errs 0: /u01/oracle/oradata/XFF/redo01.log Block recovery completed at rba 2.48670.16, scn 0.458451 Fri Nov 4 23:10:41 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_21529.trc: ORA-00604: error occurred at recursive SQL level 1 ORA-00607: Internal error occurred while making a change to a data block ORA-00600: internal error code, arguments: [4194], [35], [6], [], [], [], [], [] Error 604 happened during db open, shutting down database USER: terminating instance due to error 604 Instance terminated by USER, pid = 21529 ORA-1092 signalled during: ALTER DATABASE OPEN...
重现ORA-600 4000异常
对于数据库恢复感兴趣的人,一定对于ORA-600[4000]这个著名的错误记忆犹新,这里通过试验重现ORA-600[4000]
查询数据库obj$.con$记录
[oracle@xifenfei ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 4 06:32:36 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1219160 bytes Variable Size 92276136 bytes Database Buffers 218103808 bytes Redo Buffers 7168000 bytes Database mounted. Database opened. SQL> select OBJ#,dbms_rowid.rowid_relative_fno(rowid) rel_fno, 2 dbms_rowid.rowid_block_number(rowid) block_num from obj$ 3 where name='CON$'; OBJ# REL_FNO BLOCK_NUM ---------- ---------- ---------- 28 1 122 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
bbed修改数据块
根据催华的研究,当OBJ$中部分数据块中的csc和itl的scn都大于header scn的时候,数据库启动就会报ORA-600[4000]
[oracle@xifenfei ~]$ bbed listfile=list mode=edit password=blockedit BBED: Release 2.0.0.0.0 - Limited Production on Fri Nov 4 06:47:09 2011 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> info File# Name Size(blks) ----- ---- ---------- 1 /u01/oracle/oradata/XFF/system01.dbf 0 2 /u01/oracle/oradata/XFF/undotbs01.dbf 0 3 /u01/oracle/oradata/XFF/sysaux01.dbf 0 4 /u01/oracle/oradata/XFF/users01.dbf 0 5 /u01/oracle/oradata/XFF/datfttuser.dbf 0 BBED> set block 1 BLOCK# 1 BBED> set file 1 block 1 FILE# 1 BLOCK# 1 BBED> p kcvfhckp.kcvcpscn struct kcvcpscn, 8 bytes @484 ub4 kscnbas @484 0x00210f97 ub2 kscnwrp @488 0x0000 BBED> set block 122 BLOCK# 122 BBED> p ktbbh struct ktbbh, 48 bytes @20 ub1 ktbbhtyp @20 0x01 (KDDBTDATA) union ktbbhsid, 4 bytes @24 ub4 ktbbhsg1 @24 0x00000012 ub4 ktbbhod1 @24 0x00000012 struct ktbbhcsc, 8 bytes @28 <==csc(SCN of the last block cleanout) ub4 kscnbas @28 0x0020770d ub2 kscnwrp @32 0x0000 sb2 ktbbhict @36 1 ub1 ktbbhflg @38 0x02 (NONE) ub1 ktbbhfsl @39 0x00 ub4 ktbbhfnx @40 0x00000000 struct ktbbhitl[0], 24 bytes @44 struct ktbitxid, 8 bytes @44 ub2 kxidusn @44 0x0005 <==回滚段序号 ub2 kxidslt @46 0x0029 ub4 kxidsqn @48 0x0000029a struct ktbituba, 8 bytes @52 ub4 kubadba @52 0x00802381 ub2 kubaseq @56 0x01f9 ub1 kubarec @58 0x03 ub2 ktbitflg @60 0x2001 (KTBFUPB) union _ktbitun, 2 bytes @62 sb2 _ktbitfsc @62 0 ub2 _ktbitwrp @62 0x0000 ub4 ktbitbas @64 0x0020770e <==itl commit scn BBED> set count 16 COUNT 16 BBED> m /x 0d772010 offset 28 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y File: /u01/oracle/oradata/XFF/system01.dbf (1) Block: 122 Offsets: 28 to 60 Dba:0x0040007a ------------------------------------------------------------------------ 0d772010 00000000 01000200 00000000 <32 bytes per line> BBED> m /x 0e772010 offset 64 File: /u01/oracle/oradata/XFF/system01.dbf (1) Block: 122 Offsets: 64 to 96 Dba:0x0040007a ------------------------------------------------------------------------ 0e772010 00016c00 ffffea00 53046903 <32 bytes per line> BBED> p ktbbh struct ktbbh, 48 bytes @20 ub1 ktbbhtyp @20 0x01 (KDDBTDATA) union ktbbhsid, 4 bytes @24 ub4 ktbbhsg1 @24 0x00000012 ub4 ktbbhod1 @24 0x00000012 struct ktbbhcsc, 8 bytes @28 ub4 kscnbas @28 0x1020770d ub2 kscnwrp @32 0x0000 sb2 ktbbhict @36 1 ub1 ktbbhflg @38 0x02 (NONE) ub1 ktbbhfsl @39 0x00 ub4 ktbbhfnx @40 0x00000000 struct ktbbhitl[0], 24 bytes @44 struct ktbitxid, 8 bytes @44 ub2 kxidusn @44 0x0005 ub2 kxidslt @46 0x0029 ub4 kxidsqn @48 0x0000029a struct ktbituba, 8 bytes @52 ub4 kubadba @52 0x00802381 ub2 kubaseq @56 0x01f9 ub1 kubarec @58 0x03 ub2 ktbitflg @60 0x2001 (KTBFUPB) union _ktbitun, 2 bytes @62 sb2 _ktbitfsc @62 0 ub2 _ktbitwrp @62 0x0000 ub4 ktbitbas @64 0x1020770e BBED> sum apply Check value for File 1, Block 122: current = 0xc902, required = 0xc902
启动数据库
SQL> startup ORACLE instance started. Total System Global Area 318767104 bytes Fixed Size 1219160 bytes Variable Size 92276136 bytes Database Buffers 218103808 bytes Redo Buffers 7168000 bytes Database mounted. ORA-01092: ORACLE instance terminated. Disconnection forced
查看日志
Fri Nov 4 06:50:38 2011 Database mounted in Exclusive Mode Completed: ALTER DATABASE MOUNT Fri Nov 4 06:50:38 2011 ALTER DATABASE OPEN Fri Nov 4 06:50:38 2011 LGWR: STARTING ARCH PROCESSES ARC0 started with pid=16, OS id=7048 Fri Nov 4 06:50:38 2011 ARC0: Archival started ARC1: Archival started LGWR: STARTING ARCH PROCESSES COMPLETE ARC1 started with pid=17, OS id=7050 ARC1: STARTING ARCH PROCESSES Fri Nov 4 06:50:38 2011 ARC0: Becoming the 'no FAL' ARCH ARC0: Becoming the 'no SRL' ARCH Fri Nov 4 06:50:38 2011 Thread 1 opened at log sequence 38 Current log# 3 seq# 38 mem# 0: /u01/oracle/oradata/XFF/redo03.log Successful open of redo thread 1 Fri Nov 4 06:50:38 2011 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Fri Nov 4 06:50:38 2011 SMON: enabling cache recovery Fri Nov 4 06:50:38 2011 ARC2: Archival started ARC1: STARTING ARCH PROCESSES COMPLETE ARC1: Becoming the heartbeat ARCH ARC2 started with pid=18, OS id=7052 Fri Nov 4 06:50:38 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_7046.trc: ORA-00600: internal error code, arguments: [4000], [5], [], [], [], [], [], [] Fri Nov 4 06:50:40 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_7046.trc: ORA-00704: bootstrap process failure ORA-00704: bootstrap process failure ORA-00600: internal error code, arguments: [4000], [5], [], [], [], [], [], [] Fri Nov 4 06:50:40 2011 Error 704 happened during db open, shutting down database USER: terminating instance due to error 704 Instance terminated by USER, pid = 7046 ORA-1092 signalled during: ALTER DATABASE OPEN...
在ORACL 11.2的版本中,同样的方法无法重新该错误,数据库依然能够正常打开,所以如果要测试的朋友请选择11G以下版本进行.
通过bbed修改回滚段状态解决ORA-00704故障
undo文件丢失
SQL> startup ORACLE instance started. Total System Global Area 313860096 bytes Fixed Size 1344652 bytes Variable Size 218106740 bytes Database Buffers 88080384 bytes Redo Buffers 6328320 bytes Database mounted. ORA-01157: cannot identify/lock data file 3 - see DBWR trace file ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf' [root@xifenfei ~]# ls -l /u01/oracle/oradata/ora11g/undotbs01.dbf ls: /u01/oracle/oradata/ora11g/undotbs01.dbf: No such file or directory
尝试offline 数据文件
SQL> alter database datafile 3 offline; Database altered. SQL> alter database open; alter database open * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf' Process ID: 16365 Session ID: 125 Serial number: 5
通过这里的错误提示可以看到因为datafile 3丢失并且offline,而在数据库启动的时候需要去使用该数据文件中的回滚段去回滚事务,但是因为该数据文件被offline,使得回滚不能进行从而出现该错误.这里出现ORA-00704和ORA-00604的错误,根据感觉不能轻易的使用屏蔽回滚段的方法实现,但是还是做一尝试.使用其他方法找到回滚段.
屏蔽回滚段后重启库
SQL> startup mount pfile='/tmp/pfile' force ORACLE instance started. Total System Global Area 313860096 bytes Fixed Size 1344652 bytes Variable Size 218106740 bytes Database Buffers 88080384 bytes Redo Buffers 6328320 bytes Database mounted. SQL> alter database open; alter database open * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf' Process ID: 16696 Session ID: 125 Serial number: 5
增加了合适的回滚段屏蔽,但是数据库还不能正常启动,而且依然报ORA-00704,决定对数据库启动过程做一个10046跟踪,来判断在哪一步出了问题
对数据库open过程做10046
SQL> conn / as sysdba Connected to an idle instance. SQL> startup pfile='/tmp/pfile' mount; ORACLE instance started. Total System Global Area 313860096 bytes Fixed Size 1344652 bytes Variable Size 218106740 bytes Database Buffers 88080384 bytes Redo Buffers 6328320 bytes Database mounted. SQL> oradebug setmypid Statement processed. SQL> oradebug EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 Statement processed. SQL> oradebug TRACEFILE_NAME /u01/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_16869.trc SQL> alter database open; alter database open * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf' Process ID: 16869 Session ID: 125 Serial number: 5 --trace中发现 PARSE ERROR #3063083528:len=60 dep=1 uid=0 oct=3 lid=0 tim=1342472283605146 err=604 SELECT NULL FROM PROPS$ WHERE NAME='BOOTSTRAP_UPGRADE_ERROR' ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf' ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00376: file 3 cannot be read at this time ORA-01110: data file 3: '/u01/oracle/oradata/ora11g/undotbs01.dbf'
通过这里可以看出来很可能是在SELECT PROPS$表的时候,需要使用到回滚段,这里有两种可能需要使用回滚段(1.有数据未提交[提交事务],2.数据块scn过大[提交事务/推进scn]).对于这个问题,我尝试着修改回滚段状态来解决这个问题
修改回滚段状态
[oracle@xifenfei ~]$ bbed listfile=listfile password=blockedit mode=edit BBED: Release 2.0.0.0.0 - Limited Production on Tue Jul 17 09:10:01 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. ************* !!! For Oracle Internal Use only !!! *************** BBED> set file 1 block 225 FILE# 1 BLOCK# 225 BBED> map File: /u01/oracle/oradata/ora11g/system01.dbf (1) Block: 225 Dba:0x004000e1 ------------------------------------------------------------ KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 struct ktbbh, 48 bytes @20 struct kdbh, 14 bytes @68 struct kdbt[1], 4 bytes @82 sb2 kdbr[21] @86 ub1 freespace[5357] @128 ub1 rowdata[2703] @5485 ub4 tailchk @8188 BBED> p *kdbr[1] rowdata[1393] ------------- ub1 rowdata[1393] @6878 0x2c BBED> x /rncnnnnn rowdata[1393] @6878 ------------- flag@6878: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@6879: 0x00 cols@6880: 17 col 0[2] @6881: 1 col 1[20] @6884: _SYSSMU1_3138885392$ col 2[2] @6905: 1 col 3[2] @6908: 3 col 4[3] @6911: 128 col 5[4] @6915: 822624 col 6[1] @6920: 0 col 7[3] @6922: 498 col 8[2] @6926: 94 col 9[1] @6929: 0 col 10[2] @6931: 3 col 11[2] @6934: 2 col 12[0] @6937: *NULL* col 13[0] @6938: *NULL* col 14[0] @6939: *NULL* col 15[0] @6940: *NULL* col 16[2] @6941: 2 BBED> m /x 02 offset 6933 File: /u01/oracle/oradata/ora11g/system01.dbf (1) Block: 225 Offsets: 6933 to 7444 Dba:0x004000e1 ------------------------------------------------------------------------ 0202c103 ffffffff 02c1032c 001102c1 03145f53 5953534d 55325f34 32323832 33383232 322402c1 0202c104 03c2022d 04c3531b 16018003 c2075303 c2031401 8002c102 02c103ff ffffff02 c1032c00 1102c104 145f5359 53534d55 335f3232 31303734 32363432 2402c102 02c10403 c2023d04 c3531b17 018003c2 074903c2 02290180 02c10202 c103ffff ffff02c1 032c0011 02c10514 5f535953 534d5534 5f313435 35333138 30303624 02c10202 c10403c2 024d04c3 4f4f5101 8003c205 4502c164 018002c1 0402c103 ffffffff 02c1032c 001102c1 06145f53 5953534d 55355f33 37383736 32323331 362402c1 0202c104 03c2025d 04c3531b 1c018003 c2071603 c2021701 8002c102 02c103ff ffffff02 c1032c00 1102c107 145f5359 53534d55 365f3234 36303234 38303639 2402c102 02c10403 c2030904 c3531b1d 018003c2 075a03c2 02130180 02c10202 c103ffff ffff02c1 032c0011 02c10814 5f535953 534d5537 5f313932 34383833 30333724 02c10202 c10403c2 031904c3 531b2201 8003c207 5a03c202 1d018002 c10202c1 03ffffff ff02c103 2c001102 c109135f 53595353 4d55385f 32373630 33383233 372402c1 0202c104 03c20329 04c34f2e 34018003 c2071703 c2024a01 8002c102 02c103ff ffffff02 c1032c00 1102c10a 145f5359 53534d55 395f3335 39333435 30363135 2402c102 02c10403 <32 bytes per line> …………类似方法修改其他值 BBED> sum apply Check value for File 1, Block 225: current = 0x4d51, required = 0x4d51
启动数据库并解决异常undo
SQL> conn / as sysdba Connected to an idle instance. SQL> startup pfile='/tmp/pfile' ORACLE instance started. Total System Global Area 313860096 bytes Fixed Size 1344652 bytes Variable Size 218106740 bytes Database Buffers 88080384 bytes Redo Buffers 6328320 bytes Database mounted. Database opened. SQL> drop tablespace undotbs1; drop tablespace undotbs1 * ERROR at line 1: ORA-01561: failed to remove all objects in the tablespace specified SQL> drop tablespace undotbs1 including contents; drop tablespace undotbs1 * ERROR at line 1: ORA-01561: failed to remove all objects in the tablespace specified SQL> select type# from seg$ where file#=3; TYPE# ---------- 10 10 10 10 10 10 10 10 10 10 10 rows selected. SQL> update seg$ set type#=3 where file#=3; 10 rows updated. SQL> commit; Commit complete. SQL> drop tablespace undotbs1 including contents; Tablespace dropped. SQL> create undo tablespace undotbs1 datafile '/u01/oracle/oradata/ora11g/undotbs01.dbf' size 10m; Tablespace created.