联系:手机/微信(+86 13429648788) QQ(107644445)
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
通过对system01.dbf数据文件分析
C:\Users\XFF>dbv file =H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 20:45:23 2021 Copyright (c) 1982, 2011, Oracle and /or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF DBV-00200: 块 DBA 4330012 已标记为损坏 csc(0x0000.1686df22) higher than block scn(0x0000.00000000) 页 135708 失败, 校验代码为 6054 DBVERIFY - 验证完成 检查的页总数: 184320 处理的页总数 (数据): 93105 失败的页总数 (数据): 0 处理的页总数 (索引): 31365 失败的页总数 (索引): 1 处理的页总数 (其他): 43622 处理的总页数 (段) : 1 失败的总页数 (段) : 0 空的页总数: 16228 标记为损坏的总页数: 1 流入的页总数: 0 加密的总页数 : 0 最高块 SCN : 378591519 (0.378591519) |
确认block 135708 有问题,确认起对象为I_OBJ5
SQL> SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME, A.PARTITION_NAME 2 FROM DBA_EXTENTS A 3 WHERE FILE_ID = &FILE_ID 4 AND &BLOCK_ID BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1; 输入 file_id 的值: 1 原值 3: WHERE FILE_ID = &FILE_ID 新值 3: WHERE FILE_ID = 1 输入 block_id 的值: 135708 原值 4: AND &BLOCK_ID BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1 新值 4: AND 135708 BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1 OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME PARTITION_NAME ------------------------------ --------------- ------------------ ------------------------------ ----------------- SYS I_OBJ5 INDEX SYSTEM |
这个对象为核心对象obj$的index,无法直接rebuild,当然可以通过参考以前blog文档进行重建:bootstrap$核心index(I_OBJ1,I_USER1,I_FILE#_BLOCK#,I_IND1,I_TS#,I_CDEF1等)异常恢复—ORA-00701错误解决,直接对该坏块进行修复.
BBED> p kcbh struct kcbh, 20 bytes @0 ub1 type_kcbh @0 0x06 ub1 frmt_kcbh @1 0xa2 ub1 spare1_kcbh @2 0x00 ub1 spare2_kcbh @3 0x00 ub4 rdba_kcbh @4 0x0042121c ub4 bas_kcbh @8 0x00000000 ub2 wrp_kcbh @12 0x0000 ub1 seq_kcbh @14 0xff ub1 flg_kcbh @15 0x04 (KCBHFCKV) ub2 chkval_kcbh @16 0xe8c4 ub2 spare3_kcbh @18 0x0000 BBED> m /x 23df8616 File: H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF (0) Block: 135709 Offsets: 8 to 519 Dba:0x00000000 ------------------------------------------------------------------------ 23df8616 00000104 44fe0000 02000000 28000000 22df8616 00000000 02000200 00000000 0a001800 f7dc1b00 8002c000 bdd80100 00e00000 f331b114 0a001f00 14081e00 4505c000 2c103b00 01200000 2adf8616 00008009 01000000 3f00a200 35074010 00000000 e1b24100 56694100 06000000 641f0000 57119211 cd11d208 97080812 43127e12 b912f412 2f130d09 e013bd09 1b14cc14 0715ab07 5c087d15 b715f215 a3167007 3507de16 19175417 21088f17 ca170518 4018330a 1f0b7b18 2c196719 a219dd19 181a531a 8e1a4709 031be607 f809791b b41bef1b 2a1c651c db1ce20d 8c1d310d c71d021e 3d1e781e b31e8209 291f291f 291f291f 291f291f 291f291f 291f0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line> |
然后dbv报以下错误
C:\Users\XFF>dbv file =H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 22:06:49 2021 Copyright (c) 1982, 2011, Oracle and /or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF itl[2] has higher commit scn(0x0000.1686df2a) than block scn (0x0000.1686df23) 页 135708 失败, 校验代码为 6056 DBVERIFY - 验证完成 检查的页总数: 184320 处理的页总数 (数据): 95152 失败的页总数 (数据): 0 处理的页总数 (索引): 34569 失败的页总数 (索引): 1 处理的页总数 (其他): 38386 处理的总页数 (段) : 1 失败的总页数 (段) : 0 空的页总数: 16213 标记为损坏的总页数: 0 流入的页总数: 0 加密的总页数 : 0 最高块 SCN : 378683101 (0.378683101) |
再次对其进行修复
BBED> m /x 22df8616 File: H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF (0) Block: 135709 Offsets: 88 to 599 Dba:0x00000000 ------------------------------------------------------------------------ 22df8616 00008009 01000000 3f00a200 35074010 00000000 e1b24100 56694100 06000000 641f0000 57119211 cd11d208 97080812 43127e12 b912f412 2f130d09 e013bd09 1b14cc14 0715ab07 5c087d15 b715f215 a3167007 3507de16 19175417 21088f17 ca170518 4018330a 1f0b7b18 2c196719 a219dd19 181a531a 8e1a4709 031be607 f809791b b41bef1b 2a1c651c db1ce20d 8c1d310d c71d021e 3d1e781e b31e8209 291f291f 291f291f 291f291f 291f291f 291f0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line> |
再次dbv检查修复成功
C:\Users\XFF>dbv file =H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF DBVERIFY: Release 11.2.0.4.0 - Production on 星期六 12月 4 22:30:14 2021 Copyright (c) 1982, 2011, Oracle and /or its affiliates. All rights reserved. DBVERIFY - 开始验证: FILE = H:\BAIDUNETDISK\GS6.0BAK20211202\SYSTEM01.DBF DBVERIFY - 验证完成 检查的页总数: 184320 处理的页总数 (数据): 95152 失败的页总数 (数据): 0 处理的页总数 (索引): 34569 失败的页总数 (索引): 0 处理的页总数 (其他): 38386 处理的总页数 (段) : 1 失败的总页数 (段) : 0 空的页总数: 16213 标记为损坏的总页数: 0 流入的页总数: 0 加密的总页数 : 0 最高块 SCN : 378683101 (0.378683101) |