【BBED】使用bbed解決 the amount of space used is not equal to block size
學習bbed的過程中,修改了file# 4,block 396之後遇到kdbchk: the amount of space used is not equal to block size錯誤
注意:應該在關閉資料庫模式下進行bbed的操作。
oracle@localhost.localdomain:/home/oracle/backup>dbv file=/opt/oracle/oradata/orcl/users01.dbf blocksize=8192
DBVERIFY: Release 10.2.0.1.0 - Production on Mon Aug 8 08:55:21 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = /opt/oracle/oradata/orcl/users01.dbf
Block Checking: DBA = 16777612, Block Type = KTB-managed data block
data header at 0x2b297003027c
kdbchk: the amount of space used is not equal to block size
used=613 fsc=0 avsp=7494 dtl=8064
Page 396 failed with check code 6110
DBVERIFY - Verification complete
Total Pages Examined : 640
Total Pages Processed (Data) : 46
Total Pages Failing (Data) : 1
Total Pages Processed (Index): 63
Total Pages Failing (Index): 0
Total Pages Processed (Other): 142
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 389
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Highest block SCN : 747176 (0.747176)
諮詢了dbsnake,按照,將所有itl的fsc全部改為0,然後將kdbh.kdbhavsp和kdbh.kdbhtosp的值改成相等,它們的值都等於dbv校驗中顯示的dtl-used。
BBED> set dba 4,396
DBA 0x0100018c (16777612 4,396)
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/oracle/oradata/orcl/users01.dbf
BLOCK = 396
Block Checking: DBA = 16777612, Block Type = KTB-managed data block
data header at 0xd18387c
kdbchk: the amount of space used is not equal to block size
used=613 fsc=41 avsp=7451 dtl=8064
Block 396 failed with check code 6110
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 1
Total Blocks Failing (Data) : 1
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
BBED> set offset 0
OFFSET 0
BBED> p kdbh
struct kdbh, 14 bytes @124
ub1 kdbhflag @124 0x00 (NONE)
b1 kdbhntab @125 1
b2 kdbhnrow @126 14
sb2 kdbhfrre @128 -1
sb2 kdbhfsbo @130 46
sb2 kdbhfseo @132 7497
b2 kdbhavsp @134 7451
b2 kdbhtosp @136 7494
從上面的結果可以看出平均可利用空間kdbhavsp 和總的可利用空間kdbhtosp大小不一致。
檢視itl中的fsc
BBED> set offset 44
OFFSET 44
BBED> p ktbbhitl
struct ktbbhitl[0], 24 bytes @44
struct ktbitxid, 8 bytes @44
ub2 kxidusn @44 0xffff
ub2 kxidslt @46 0x0000
ub4 kxidsqn @48 0x00000000
struct ktbituba, 8 bytes @52
ub4 kubadba @52 0x00000000
ub2 kubaseq @56 0x0000
ub1 kubarec @58 0x00
ub2 ktbitflg @60 0x8000 (KTBFCOM)
union _ktbitun, 2 bytes @62
b2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x000b0c24
struct ktbbhitl[1], 24 bytes @68
struct ktbitxid, 8 bytes @68
ub2 kxidusn @68 0x0001
ub2 kxidslt @70 0x002e
ub4 kxidsqn @72 0x0000015b
struct ktbituba, 8 bytes @76
ub4 kubadba @76 0x008000a6
ub2 kubaseq @80 0x00fa
ub1 kubarec @82 0x21
ub2 ktbitflg @84 0x2001 (KTBFUPB)
union _ktbitun, 2 bytes @86
b2 _ktbitfsc @86 41 --不為0
ub2 _ktbitwrp @86 0x0029
ub4 ktbitbas @88 0x000b2e92
struct ktbbhitl[2], 24 bytes @92
struct ktbitxid, 8 bytes @92
ub2 kxidusn @92 0x0000
ub2 kxidslt @94 0x0000
ub4 kxidsqn @96 0x00000000
struct ktbituba, 8 bytes @100
ub4 kubadba @100 0x00000000
ub2 kubaseq @104 0x0000
ub1 kubarec @106 0x00
ub2 ktbitflg @108 0x0000 (NONE)
union _ktbitun, 2 bytes @110
b2 _ktbitfsc @110 0
ub2 _ktbitwrp @110 0x0000
ub4 ktbitbas @112 0x00000000
修改 b2 _ktbitfsc 的值使其為0.
BBED> set offset 86
OFFSET 86
BBED> dump count 64
File: /opt/oracle/oradata/orcl/users01.dbf (4)
Block: 396 Offsets: 86 to 149 Dba:0x0100018c
------------------------------------------------------------------------
2900922e 0b000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000001 0e00ffff 2e00491d 1b1d461d 00000e00 5a1f2f1f 041fdb1e
<32 bytes per line>
BBED> modify /x 00
File: /opt/oracle/oradata/orcl/users01.dbf (4)
Block: 396 Offsets: 86 to 149 Dba:0x0100018c
------------------------------------------------------------------------
0000922e 0b000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000001 0e00ffff 2e00491d 1b1d461d 00000e00 5a1f2f1f 041fdb1e
<32 bytes per line>
檢視修改後的itl資訊
BBED> p ktbbhitl
struct ktbbhitl[0], 24 bytes @44
struct ktbitxid, 8 bytes @44
ub2 kxidusn @44 0xffff
ub2 kxidslt @46 0x0000
ub4 kxidsqn @48 0x00000000
struct ktbituba, 8 bytes @52
ub4 kubadba @52 0x00000000
ub2 kubaseq @56 0x0000
ub1 kubarec @58 0x00
ub2 ktbitflg @60 0x8000 (KTBFCOM)
union _ktbitun, 2 bytes @62
b2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x000b0c24
struct ktbbhitl[1], 24 bytes @68
struct ktbitxid, 8 bytes @68
ub2 kxidusn @68 0x0001
ub2 kxidslt @70 0x002e
ub4 kxidsqn @72 0x0000015b
struct ktbituba, 8 bytes @76
ub4 kubadba @76 0x008000a6
ub2 kubaseq @80 0x00fa
ub1 kubarec @82 0x21
ub2 ktbitflg @84 0x2001 (KTBFUPB)
union _ktbitun, 2 bytes @86
b2 _ktbitfsc @86 0
ub2 _ktbitwrp @86 0x0000
ub4 ktbitbas @88 0x000b2e92
struct ktbbhitl[2], 24 bytes @92
struct ktbitxid, 8 bytes @92
ub2 kxidusn @92 0x0000
ub2 kxidslt @94 0x0000
ub4 kxidsqn @96 0x00000000
struct ktbituba, 8 bytes @100
ub4 kubadba @100 0x00000000
ub2 kubaseq @104 0x0000
ub1 kubarec @106 0x00
ub2 ktbitflg @108 0x0000 (NONE)
union _ktbitun, 2 bytes @110
b2 _ktbitfsc @110 0
ub2 _ktbitwrp @110 0x0000
ub4 ktbitbas @112 0x00000000
BBED> p kdbh
struct kdbh, 14 bytes @124
ub1 kdbhflag @124 0x00 (NONE)
b1 kdbhntab @125 1
b2 kdbhnrow @126 14
sb2 kdbhfrre @128 -1
sb2 kdbhfsbo @130 46
sb2 kdbhfseo @132 7497
b2 kdbhavsp @134 7451
b2 kdbhtosp @136 7494
修改kdbhavsp的值於kdbhtosp保持一致
BBED> set offset 134
OFFSET 134
BBED> dump count 16
File: /opt/oracle/oradata/orcl/users01.dbf (4)
Block: 396 Offsets: 134 to 149 Dba:0x0100018c
------------------------------------------------------------------------
1b1d461d 00000e00 5a1f2f1f 041fdb1e
<32 bytes per line>
7494的十六進位制對應的值為1D46,考慮到oracle資料塊中的儲存方式,做如下修改
BBED> modify /x 46
File: /opt/oracle/oradata/orcl/users01.dbf (4)
Block: 396 Offsets: 134 to 149 Dba:0x0100018c
------------------------------------------------------------------------
461d461d 00000e00 5a1f2f1f 041fdb1e
<32 bytes per line>
BBED> sum dba 4,396
Check value for File 4, Block 396:
current = 0x2b93, required = 0x2bce
BBED> sum dba 4,396 apply
Check value for File 4, Block 396:
current = 0x2bce, required = 0x2bce
檢查測試:
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/oracle/oradata/orcl/users01.dbf
BLOCK = 396
Block Checking: DBA = 16777612, Block Type = KTB-managed data block
data header at 0xd18387c
kdbchk: the amount of space used is not equal to block size
used=613 fsc=0 avsp=7494 dtl=8064
Block 396 failed with check code 6110
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 1
Total Blocks Failing(Data):1 --依然有錯誤
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
在sqlplus 中dump資料塊檢視資訊。
Block header dump: 0x0100018c
Object id on Block? Y
seg/obj: 0xcd2e csc: 0x00.b0c24 itc: 3 flg: E typ: 1 - DATA
brn: 0 bdba: 0x1000189 ver: 0x01 opc: 0
inc: 0 exflg: 0
Itl Xid Uba Flag Lck Scn/Fsc
0x01 0xffff.000.00000000 0x00000000.0000.00 C--- 0 scn 0x0000.000b0c24
0x02 0x0001.02e.0000015b 0x008000a6.00fa.21 --U- 1 fsc 0x0000.000b2e92
0x03 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000
dump 檔案中的itl事務槽中的fsc資訊和bbed中修改的資訊不一致,即仍然有fsc 不為0。是不是這個原因呢?資料塊上有回滾事務,關閉資料庫以後:
再次檢查,結果正確。
BBED> verify
DBVERIFY - Verification starting
FILE = /opt/oracle/oradata/orcl/users01.dbf
BLOCK = 396
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 1
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
DBVERIFY: Release 10.2.0.1.0 - Production on Mon Aug 8 13:19:28 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = /opt/oracle/oradata/orcl/users01.dbf
DBVERIFY - Verification complete
Total Pages Examined : 640
Total Pages Processed (Data) : 51
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 63
Total Pages Failing (Index): 0
Total Pages Processed (Other): 145
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 381
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Highest block SCN : 794582 (0.794582)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-704382/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle BBED(block browse and editor)OracleBloC
- SUPTOOL: BBED - 7.3.2+ Database Block Editor(轉)DatabaseBloC
- oracle bbed使用Oracle
- 【BBED】使用bbed修改數字型別資料型別
- 【BBED】使用bbed修改字元型別資料字元型別
- BBED安裝使用
- 【BBED】使用bbed 修改日期型別的資料型別
- 【BBED】BBED基礎知識
- Oracle bbed工具的使用Oracle
- 【BBED】使用bbed恢復已經刪除的行資料
- BBED命令
- 【BBED】Oracle bbed常用命令參考Oracle
- BBED (Oracle Block Brower and EDitor Tool) :資料塊修復工具OracleBloC
- 使用oracle 11g bbed dump undo header block報錯之系列六OracleHeaderBloC
- [20150529]使用bbed解決丟失的歸檔.txt
- BBED簡介
- BBED學習
- bbed二(命令)
- bbed安裝
- 用bbed檢視資料檔案的資料塊block 0及block 1BloC
- BBED工具的安裝使用(二)
- BBED工具的安裝使用(一)
- [BBED]Oracle 11.2.0.4 Centos6.5下編譯bbedOracleCentOS編譯
- BBED 的安裝
- bbed一(安裝)
- BBED 修改檔案頭 解決 ORA-01190
- 使用BBED跳過歸檔檔案
- 11g下編譯使用BBED編譯
- 使用BBED修改檔案頭解決資料庫Open驗證問題(下)資料庫
- 使用BBED修改檔案頭解決資料庫Open驗證問題(上)資料庫
- 使用DUMP資料塊與BBED檢視BLOCK對比資料庫修改時的SCNBloC資料庫
- Oracle redo解析之-2、BBED & DUMP工具使用Oracle Redo
- oracle10g bbed編譯與使用Oracle編譯
- 一次使用BBED處理壞塊
- Oracle BBED 工具介紹Oracle
- Oracle BBED 工具 說明Oracle
- BBED學習之一
- oracle bbed的連線Oracle