【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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SUPTOOL: BBED - 7.3.2+ Database Block Editor(轉)DatabaseBloC
- 【BBED】BBED基礎知識
- 【BBED】Oracle bbed常用命令參考Oracle
- [20181227]bbed的使用問題.txt
- [20210901]cygwin下使用bbed.txt
- [20210303]bbed使用小問題.txt
- [20210906]bbed讀取資料塊(bbed-wrap.sh).txt
- BBED 的安裝
- 【BBED】使用BBED修改資料檔案SCN,使該檔案從offline轉變為online
- Oracle redo解析之-2、BBED & DUMP工具使用Oracle Redo
- [20181204]bbed修改問題.txt
- [20180619]bbed verify問題.txt
- [20231008]bbed探究lob段.txt
- oracle之 11.2.0.4 bbed安裝Oracle
- [20220223]bbed ktbbh.ktbbhict.txt
- [20210920]bbed的assign命令.txt
- bbed修改undo段狀態
- [20210304]bbed的assign命令.txt
- [20190107]生成bbed執行指令碼:指令碼
- DBA手記-BBED 的說明
- 11_Oracle bbed工具介紹Oracle
- [20190104]bbed手工插入資料.txt
- [20230224]bbed設定偏移技巧.txt
- [20210223]bbed itl ktbitflg 2.txt
- ORA-01190使用bbed強制online資料檔案
- new CartItem (['amount' => $amount])
- Oracle 11G 安裝 bbed 工具Oracle
- [20180628]顯示bbed x命令格式.txt
- [20190104]bbed手動修改資料.txt
- Oracle bbed一鍵安裝工具分享Oracle
- [20210318]bbed讀取資料塊.txt
- [20210311]如何建立bbed安裝包.txt
- #1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs
- [20231020]rename IDL_UB1$後使用bbed的恢復.txt
- [20180627]測試bbed是否支援管道命令.txt
- [20231021]生成bbed的執行指令碼.txt指令碼
- oracle 推進scn(poke、gdb、event、bbed)方法Oracle
- [20230427]bbed sum apply問題2.txtAPP
- 【kingsql分享】使用BBED修改Oracle資料檔案頭推進SCNSQLOracle