标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 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-600 kcratr_nab_less_than_odr 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 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,881)
- DB2 (22)
- MySQL (82)
- Oracle (1,706)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (72)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (660)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
- 几乎动用了所有手段的Oracle故障恢复
- Oracle Block Edit Tool (obet) 功能增强–2026.07
- Oracle 19c 202607补丁(RUs+OJVM)-19.32
分类目录归档:Oracle备份恢复
通过bbed解决ORA-00600[4000]案例
数据库启动出现ORA-00600[4000]错误
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...
查看trace文件
*** 2011-11-04 06:50:38.942
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [4000], [5], [], [], [], [], [], []
Current SQL statement for this session:
select ctime, mtime, stime from obj$ where obj# = :1
Block header dump: 0x0040007a
Object id on Block? Y
seg/obj: 0x12 csc: 0x00.1020770d itc: 1 flg: - typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0005.029.0000029a 0x00802381.01f9.03 --U- 1 fsc 0x0000.1020770e
查询trace相关数据对应值
SQL> select DBMS_UTILITY.data_block_address_file (TO_NUMBER ('0040007a','xxxxxxxx')) file_no,
2 DBMS_UTILITY.data_block_address_block (TO_NUMBER ('0040007a','xxxxxxxx')) block_no
3 from dual;
FILE_NO BLOCK_NO
---------- ----------
1 122
SQL> select to_number('1020770e','xxxxxxxxxxx') itl_commit from dual;
ITL_COMMIT
----------
270563086
SQL> select to_number('1020770d','xxxxxxxxxxxx') csc from dual;
CSC
----------
270563085
通过这里的分析,我们可以得出file 1 block 122的内容未提交,可能是导致错误ORA-00600[4000],尝试这手工提交该事务
BBED> set file 1 block 122
FILE# 1
BLOCK# 122
BBED> map
File: /u01/oracle/oradata/XFF/system01.dbf (1)
Block: 122 Dba:0x0040007a
------------------------------------------------------------
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[108] @86
ub1 freespace[873] @302
ub1 rowdata[7013] @1175
ub4 tailchk @8188
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> set count 16
COUNT 16
BBED> m /x 0180 offset 60
File: /u01/oracle/oradata/XFF/system01.dbf (1)
Block: 122 Offsets: 60 to 75 Dba:0x0040007a
------------------------------------------------------------------------
01800000 0e772010 00016c00 ffffea00
<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 0x8001 (KTBFCOM)
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 = 0x6902, required = 0x6902
尝试重启库
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
查看alert日志
Fri Nov 4 07:42:46 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_7702.trc: ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], [] Fri Nov 4 07:42:46 2011 Errors in file /u01/oracle/admin/XFF/udump/xff_ora_7702.trc: ORA-00704: bootstrap process failure ORA-00704: bootstrap process failure ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], [] Fri Nov 4 07:42:46 2011 Error 704 happened during db open, shutting down database USER: terminating instance due to error 704 Instance terminated by USER, pid = 7702 ORA-1092 signalled during: ALTER DATABASE OPEN...
分析trace文件
*** 2011-11-04 07:42:46.273
Recovery of Online Redo Log: Thread 1 Group 1 Seq 40 Reading mem 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 0
Average hash chain = 0/0 = 0.0
Max compares per lookup = 0
Avg compares per lookup = 0/0 = 0.0
----------------------------------------------
tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x1)
tkcrrpa: (WARN) Failed initial attempt to send ARCH message (message:0x1)
[ktbdchk] -- readers_dsz -- bad dscn
scn: 0x0000.1020770escn: 0x0000.0021fa09
*** 2011-11-04 07:42:46.530
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], []
Current SQL statement for this session:
select ctime, mtime, stime from obj$ where obj# = :1
Block header dump: 0x0040007a
Object id on Block? Y
seg/obj: 0x12 csc: 0x00.1020770d itc: 1 flg: - typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0x0005.029.0000029a 0x00802381.01f9.03 C--- 0 scn 0x0000.1020770e
根据这个错误提示ktbdchk–>bad dscn,猜测ktbdchk是header scn中的ktbdchk,查找1020770e发现是itl comomit scn,通过bbed查看
BBED> p kcvfhckp.kcvcpscn struct kcvcpscn, 8 bytes @484 ub4 kscnbas @484 0x0021fa09 ub2 kscnwrp @488 0x0000
通过这里可以知道ORA-00600[ktbdchk1: bad dscn]是因为itl comomit scn远大于datafile header scn,从而oracle认为datafile header scn是错误的,从而提示ktbdchk1: bad dscn.尝试bbed修改itl comomit scn
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 0x8001 (KTBFCOM)
union _ktbitun, 2 bytes @62
sb2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x1020770e
BBED> m /x 09fa2100 offset 64
File: /u01/oracle/oradata/XFF/system01.dbf (1)
Block: 122 Offsets: 64 to 79 Dba:0x0040007a
------------------------------------------------------------------------
09fa2100 00016c00 ffffea00 53046903
<32 bytes per line>
BBED> sum apply
Check value for File 1, Block 122:
current = 0xf404, required = 0xf404
启动数据库
SQL> conn / as sysdba 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.
dul 10支持oracle 11g r2
以前一直以为dul对应的版本只能恢复最高的数据库版本一致,今天测试发现dul 10可以恢复11g最新版的数据库.
模拟环境
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> select to_char(sysdate,'yyyy-mm-dd hh:mi:ss') "WWW.XIFENFEI.COM" FROM DUAL;
WWW.XIFENFEI.COM
-------------------
2012-08-04 12:49:29
SQL> create table t_xifenfei
2 as
3 select * from dba_objects;
Table created.
SQL> select count(*) from t_xifenfei;
COUNT(*)
----------
74491
SQL> alter system checkpoint;
System altered.
SQL> /
System altered.
dul 参数配置
[oracle@xifenfei dul]$ more init.dul
osd_big_endian_flag=false
osd_dba_file_bits=10
osd_c_struct_alignment=32
osd_file_leader_size=0
osd_word_size = 32
dc_columns=2000000
dc_tables=10000
dc_objects=1000000
dc_users=400
dc_segments=100000
control_file = control11.dul
db_block_size=8192
export_mode=false
compatible=11
BUFFER=10000000
LDR_ENCLOSE_CHAR=|
[oracle@xifenfei dul]$ more control11.dul
0 1 /u01/oracle/oradata/ora11g/system01.dbf
1 2 /u01/oracle/oradata/ora11g/sysaux01.dbf
2 3 /u01/oracle/oradata/ora11g/undotbs01.dbf
4 4 /u01/oracle/oradata/ora11g/users01.dbf
dul恢复11g数据库
[oracle@xifenfei dul]$ ./dul10
Data UnLoader: 10.2.0.5.13 - Internal Only - on Sat Aug 4 00:36:15 2012
with 64-bit io functions
Copyright (c) 1994 2012 Bernard van Duijnen All rights reserved.
Strictly Oracle Internal Use Only
DUL: Warning: Recreating file "dul.log"
Found db_id = 4185048347
Found db_name = ORA11G
DUL> bootstrap;
Probing file = 1, block = 520
. unloading table BOOTSTRAP$
DUL: Warning: block number is non zero but marked deferred trying to process it anyhow
60 rows unloaded
DUL: Warning: Dictionary cache DC_BOOTSTRAP is empty
Reading BOOTSTRAP.dat 60 entries loaded
Parsing Bootstrap$ contents
Generating dict.ddl for version 11
OBJ$: segobjno 18, file 1 block 240
TAB$: segobjno 2, tabno 1, file 1 block 144
COL$: segobjno 2, tabno 5, file 1 block 144
USER$: segobjno 10, tabno 1, file 1 block 208
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table OBJ$ 74493 rows unloaded
. unloading table TAB$ 2858 rows unloaded
. unloading table COL$ 93503 rows unloaded
. unloading table USER$ 88 rows unloaded
Reading USER.dat 88 entries loaded
Reading OBJ.dat 74493 entries loaded and sorted 74493 entries
Reading TAB.dat 2858 entries loaded
Reading COL.dat 93503 entries loaded and sorted 93503 entries
Reading BOOTSTRAP.dat 60 entries loaded
DUL: Warning: Recreating file "dict.ddl"
Generating dict.ddl for version 11
OBJ$: segobjno 18, file 1 block 240
TAB$: segobjno 2, tabno 1, file 1 block 144
COL$: segobjno 2, tabno 5, file 1 block 144
USER$: segobjno 10, tabno 1, file 1 block 208
TABPART$: segobjno 568, file 1 block 3872
INDPART$: segobjno 573, file 1 block 3912
TABCOMPART$: segobjno 590, file 1 block 4056
INDCOMPART$: segobjno 595, file 1 block 4096
TABSUBPART$: segobjno 580, file 1 block 3976
INDSUBPART$: segobjno 585, file 1 block 4016
IND$: segobjno 2, tabno 3, file 1 block 144
ICOL$: segobjno 2, tabno 4, file 1 block 144
LOB$: segobjno 2, tabno 6, file 1 block 144
COLTYPE$: segobjno 2, tabno 7, file 1 block 144
TYPE$: segobjno 495, tabno 1, file 1 block 3344
COLLECTION$: segobjno 495, tabno 2, file 1 block 3344
ATTRIBUTE$: segobjno 495, tabno 3, file 1 block 3344
LOBFRAG$: segobjno 601, file 1 block 4144
LOBCOMPPART$: segobjno 604, file 1 block 4168
UNDO$: segobjno 15, file 1 block 224
TS$: segobjno 6, tabno 2, file 1 block 176
PROPS$: segobjno 98, file 1 block 800
Running generated file "@dict.ddl" to unload the dictionary tables
. unloading table OBJ$
DUL: Warning: Recreating file "OBJ.ctl"
74493 rows unloaded
. unloading table TAB$
DUL: Warning: Recreating file "TAB.ctl"
2858 rows unloaded
. unloading table COL$
DUL: Warning: Recreating file "COL.ctl"
93503 rows unloaded
. unloading table USER$
DUL: Warning: Recreating file "USER.ctl"
88 rows unloaded
. unloading table TABPART$ 90 rows unloaded
. unloading table INDPART$ 106 rows unloaded
. unloading table TABCOMPART$ 1 row unloaded
. unloading table INDCOMPART$ 0 rows unloaded
. unloading table TABSUBPART$ 32 rows unloaded
. unloading table INDSUBPART$ 0 rows unloaded
. unloading table IND$ 5092 rows unloaded
. unloading table ICOL$ 7518 rows unloaded
. unloading table LOB$ 1251 rows unloaded
. unloading table COLTYPE$ 2967 rows unloaded
. unloading table TYPE$ 2872 rows unloaded
. unloading table COLLECTION$ 985 rows unloaded
. unloading table ATTRIBUTE$ 11127 rows unloaded
. unloading table LOBFRAG$ 1 row unloaded
. unloading table LOBCOMPPART$ 0 rows unloaded
. unloading table UNDO$ 21 rows unloaded
. unloading table TS$ 6 rows unloaded
. unloading table PROPS$ 36 rows unloaded
Reading USER.dat 88 entries loaded
Reading OBJ.dat 74493 entries loaded and sorted 74493 entries
Reading TAB.dat 2858 entries loaded
Reading COL.dat 93503 entries loaded and sorted 93503 entries
Reading TABPART.dat 90 entries loaded and sorted 90 entries
Reading TABCOMPART.dat 1 entries loaded and sorted 1 entries
Reading TABSUBPART.dat 32 entries loaded and sorted 32 entries
Reading INDPART.dat 106 entries loaded and sorted 106 entries
Reading INDCOMPART.dat 0 entries loaded and sorted 0 entries
Reading INDSUBPART.dat 0 entries loaded and sorted 0 entries
Reading IND.dat 5092 entries loaded
Reading LOB.dat
DUL: Warning: Increased the size of DC_LOBS from 1024 to 8192 entries
1251 entries loaded
Reading ICOL.dat 7518 entries loaded
Reading COLTYPE.dat 2967 entries loaded
Reading TYPE.dat 2872 entries loaded
Reading ATTRIBUTE.dat 11127 entries loaded
Reading COLLECTION.dat 985 entries loaded
Reading BOOTSTRAP.dat 60 entries loaded
Reading LOBFRAG.dat 1 entries loaded and sorted 1 entries
Reading LOBCOMPPART.dat 0 entries loaded and sorted 0 entries
Reading UNDO.dat 21 entries loaded
Reading TS.dat 6 entries loaded
Reading PROPS.dat 36 entries loaded
Database character set is ZHS16GBK
Database national character set is AL16UTF16
DUL> desc chf.t_xifenfei;
Table CHF.T_XIFENFEI
obj#= 75562, dataobj#= 75562, ts#= 4, file#= 4, block#=170
tab#= 0, segcols= 15, clucols= 0
Column information:
icol# 01 segcol# 01 OWNER len 30 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 02 segcol# 02 OBJECT_NAME len 128 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 03 segcol# 03 SUBOBJECT_NAME len 30 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 04 segcol# 04 OBJECT_ID len 22 type 2 NUMBER(0,-127)
icol# 05 segcol# 05 DATA_OBJECT_ID len 22 type 2 NUMBER(0,-127)
icol# 06 segcol# 06 OBJECT_TYPE len 19 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 07 segcol# 07 CREATED len 7 type 12 DATE
icol# 08 segcol# 08 LAST_DDL_TIME len 7 type 12 DATE
icol# 09 segcol# 09 TIMESTAMP len 19 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 10 segcol# 10 STATUS len 7 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 11 segcol# 11 TEMPORARY len 1 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 12 segcol# 12 GENERATED len 1 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 13 segcol# 13 SECONDARY len 1 type 1 VARCHAR2 cs 852(ZHS16GBK)
icol# 14 segcol# 14 NAMESPACE len 22 type 2 NUMBER(0,-127)
icol# 15 segcol# 15 EDITION_NAME len 30 type 1 VARCHAR2 cs 852(ZHS16GBK)
DUL> unload table chf.t_xifenfei;
. unloading table T_XIFENFEI 74491 rows unloaded
通过一些列的dul 10测试,发现dul 10功能确实较9强大了很多.支持asm,支持11g,支持字符串换行+lob类型
通过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.

加我微信(17813235971)
加我QQ(107644445)

