标签:
++++创建一个测试表
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
SQL> conn roger/rogerConnected.SQL> create
cluster t_cluster(id number(2)) ;Cluster created.SQL> create
table t_06102 (id number(2)
primary key,3
name varchar2(13))4 cluster t_cluster(id);Table
created.SQL> create
index t_cluster_idx
on cluster t_cluster;Index
created.SQL>SQL> insert
into t_0610 values(1,‘baidu‘);1 row created.SQL> insert
into t_0610 values(2,‘google‘);1 row created.SQL> insert
into t_0610 values(8,‘roger‘);1 row created.SQL> commit;Commit
complete.SQL> select
* from
t_0610;ID NAME---------- -------------1 baidu2 google8 rogerSQL> select
dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) blk#2
from t_0610;FILE# BLK#---------- ----------6 1726 1736 174SQL> oradebug setmypidORA-01031: insufficient
privilegesSQL> conn /as
sysdbaConnected.SQL> oradebug setmypidStatement processed.SQL> alter
system flush buffer_cache;System altered.SQL> alter
system dump datafile 6 block 172;System altered.SQL> oradebug close_traceStatement processed.SQL> oradebug tracefile_name/oracle/diag/rdbms/roger/roger/trace/roger_ora_16777.trc |
++++blockdump内容
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
Dump of buffer cache at level 4 for tsn=7 rdba=25165996BH (0x71bf2f28) file#: 6 rdba: 0x018000ac (6/172) class: 1 ba: 0x71ad8000set: 3 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 0,15dbwrid: 0 obj: 77519 objn: 77520 tsn: 7 afn: 6 hint: fhash: [0x8abfa738,0x8abfa738] lru: [0x74ff33a0,0x7abf47d0]lru-flags: on_auxiliary_listckptq: [NULL] fileq: [NULL] objq: [NULL] objaq: [NULL]st: FREE md: NULL fpin: ‘ktspbwh2: ktspfmdb‘ tch: 0 lfb: 33flags:Block dump from disk:buffer tsn: 7 rdba: 0x018000ac (6/172)scn: 0x0000.00b941a6 seq: 0x01 flg: 0x06 tail: 0x41a60601frmt: 0x02 chkval: 0xcb52 type: 0x06=trans dataHex dump of block: st=0, typ_found=1Dump of memory from 0x00007FADB771EA00 to 0x00007FADB7720A007FADB771EA00 0000A206 018000AC 00B941A6 06010000 [.........A......]7FADB771EA10 0000CB52 00000001 00012ECF 00B94199 [R............A..]7FADB771EA20 00000000 00320002 018000A8 00080006 [......2.........]7FADB771EA30 00000515 00C00562 002E014E 00008000 [....b...N.......]7FADB771EA40 00B94198 001D0007 000004C9 00C03C08 [.A...........<..]7FADB771EA50 0032019D 00002001 00B941A6 00000000 [..2.. ...A......]7FADB771EA60 00000000 00020201 001AFFFF 1F5E1F78 [............x.^.]7FADB771EA70 00001F5E 00010001 1F820001 00001F78 [^...........x...]7FADB771EA80 00000000 00000000 00000000 00000000 [................]Repeat 500 times7FADB77209D0 00000000 00000000 00000000 0001026C [............l...]7FADB77209E0 69616205 00AC7564 01000101 00800100 [.baidu..........]7FADB77209F0 010000AC 00AC0080 02C10200 41A60601 [...............A]Block header dump: 0x018000acObject id on Block? Yseg/obj: 0x12ecf csc: 0x00.b94199 itc: 2 flg: E typ: 1 - DATAbrn: 0 bdba: 0x18000a8 ver: 0x01 opc: 0inc: 0 exflg: 0Itl Xid Uba Flag Lck Scn/Fsc0x01 0x0006.008.00000515 0x00c00562.014e.2e C--- 0 scn 0x0000.00b941980x02 0x0007.01d.000004c9 0x00c03c08.019d.32 --U- 1 fsc 0x0000.00b941a6bdba: 0x018000acdata_block_dump,data header at 0x7fadb771ea64===============tsiz: 0x1f98hsiz: 0x1apbl: 0x7fadb771ea6476543210flag=-------Kntab=2 ---- > 大于2,说明这是一个cluster tablenrow=2frre=-1fsbo=0x1afseo=0x1f78avsp=0x1f5etosp=0x1f5e0xe:pti[0] nrow=1 offs=00x12:pti[1] nrow=1 offs=10x16:pri[0] offs=0x1f820x18:pri[1] offs=0x1f78block_row_dump:tab 0, row 0, @0x1f82tl: 22 fb: K-H-FL-- lb: 0x0 cc: 1curc: 1 comc: 1 pk: 0x018000ac.0 nk: 0x018000ac.0col 0: [ 2] c1 02tab 1, row 0, @0x1f78tl: 10 fb: -CH-FL-- lb: 0x2 cc: 1 cki: 0col 0: [ 5] 62 61 69 64 75end_of_block_dumpEnd dump data blocks tsn: 7 file#: 6 minblk 172 maxblk 172 |
大家能够看到。这跟普通的data block的dump内容是有所区别的。由于这里涉及到cluster table。
以下来模拟下手工提交cluster table的事务。
+++++模拟事务不提交
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
SQL> alter
system checkpoint;System altered.SQL> alter
system flush buffer_cache;System altered.SQL> show userUSER
is "SYS"SQL> conn roger/rogerConnected.SQL> delete
from t_0610 where
id=8; ++++++不提交1 row deleted.SQL> alter
system flush buffer_cache;System altered.SQL> select
xidusn,xidslot,xidsqn,ubablk,ubafil,ubarec from
v$transaction;XIDUSN XIDSLOT XIDSQN UBABLK UBAFIL UBAREC---------- ---------- ---------- ---------- ---------- ----------3 17 1212 1066 3 20SQL> |
这里我们能够看到对于这个未提交的事务XID为:3.17.1212 前面我们已经知道
測试表中的数据分布在3个block中,这里我模拟的情况是删除第3条数据。且不提交。通过bbed来实现手工
提交这个未提交事务,注意:第3条数据是在第3个block中,即174 block。
+++++首先改动表的itl等信息
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
|
BBED> set file 6 block 174FILE# 6BLOCK# 174BBED> mapFile: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Dba:0x018000ae------------------------------------------------------------KTB Data Block (Table/Cluster)struct kcbh, 20 bytes @0struct ktbbh, 72 bytes @20struct kdbh, 14 bytes @100struct kdbt[2], 8 bytes @114sb2 kdbr[2] @122ub1 freespace[8030] @126ub1 rowdata[32] @8156ub4 tailchk @8188BBED> p kdbrsb2 kdbr[0] @122 8066sb2 kdbr[1] @124 8056BBED> p ktbbhstruct ktbbh, 72 bytes @20ub1 ktbbhtyp @20 0x01 (KDDBTDATA)union ktbbhsid, 4 bytes @24ub4 ktbbhsg1 @24 0x00012ecfub4 ktbbhod1 @24 0x00012ecfstruct ktbbhcsc, 8 bytes @28ub4 kscnbas @28 0x00b94309ub2 kscnwrp @32 0x0000sb2 ktbbhict @36 2ub1 ktbbhflg @38 0x32 (NONE)ub1 ktbbhfsl @39 0x00ub4 ktbbhfnx @40 0x018000a8struct ktbbhitl[0], 24 bytes @44struct ktbitxid, 8 bytes @44ub2 kxidusn @44 0x0009ub2 kxidslt @46 0x0002ub4 kxidsqn @48 0x0000044cstruct ktbituba, 8 bytes @52ub4 kubadba @52 0x00c000f9ub2 kubaseq @56 0x014aub1 kubarec @58 0x1dub2 ktbitflg @60 0x8000 (KTBFCOM)union _ktbitun, 2 bytes @62sb2 _ktbitfsc @62 0ub2 _ktbitwrp @62 0x0000ub4 ktbitbas @64 0x00b941a4struct ktbbhitl[1], 24 bytes @68struct ktbitxid, 8 bytes @68ub2 kxidusn @68 0x0003ub2 kxidslt @70 0x0011ub4 kxidsqn @72 0x000004bcstruct ktbituba, 8 bytes @76ub4 kubadba @76 0x00c0042aub2 kubaseq @80 0x0185ub1 kubarec @82 0x13ub2 ktbitflg @84 0x0001 (NONE)union _ktbitun, 2 bytes @86sb2 _ktbitfsc @86 6ub2 _ktbitwrp @86 0x0006ub4 ktbitbas @88 0x00000000BBED> modify /x 0180Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 84 to 87 Dba:0x018000ae------------------------------------------------------------------------01800600<32 bytes per line>BBED> modify /x 00 offset 86File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 86 to 87 Dba:0x018000ae------------------------------------------------------------------------0000<32 bytes per line>BBED> sum applyCheck value
for File 6, Block 174:current = 0x055c, required = 0x055cBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 174Block Checking: DBA = 25165998, Block Type = KTB-managed data blockdata header at 0x7f88d49c1264kdbchk: row locked by non-existent transactiontable=1 slot=0lockid=2 ktbbhitc=2Block 174 failed with check code 6101BBED> p *kdbr[1]rowdata[0]----------ub1 rowdata[0] @8156 0x7cBBED> x /rnnnnccccccnnnnnnnnnnnrowdata[0] @8156----------flag@8156: 0x7c (KDRHFL, KDRHFF, KDRHFD, KDRHFH, KDRHFC)lock@8157: 0x02cols@8158: 0BBED> modify /x 6c offset 8156File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 8156 to 8159 Dba:0x018000ae------------------------------------------------------------------------6c020100<32 bytes per line>BBED> sum applyCheck value
for File 6, Block 174:current = 0x054c, required = 0x054cBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 174Block Checking: DBA = 25165998, Block Type = KTB-managed data blockdata header at 0x1112864kdbchk: row locked by non-existent transactiontable=1 slot=0lockid=2 ktbbhitc=2Block 174 failed with check code 6101DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 1Total Blocks Failing (Data) : 1Total Blocks Processed (Index): 0Total Blocks Failing (Index): 0Total Blocks
Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBEDBBED> p kdbhstruct kdbh, 14 bytes @100ub1 kdbhflag @100 0x01 (KDBHFFK)sb1 kdbhntab @101 2sb2 kdbhnrow @102 2sb2 kdbhfrre @104 -1sb2 kdbhfsbo @106 26sb2 kdbhfseo @108 8056sb2 kdbhavsp @110 8030sb2 kdbhtosp @112 8040BBED> d /v offset 102
count 4File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 102 to 105 Dba:0x018000ae-------------------------------------------------------0200ffff l ....<16 bytes per line>BBED> modify /x 01 offset 102File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 102 to 105 Dba:0x018000ae------------------------------------------------------------------------0100ffff<32 bytes per line>BBED> sum applyCheck value
for File 6, Block 174:current = 0x054f, required = 0x054fBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 174Block Checking: DBA = 25165998, Block Type = KTB-managed data blockdata header at 0x1112864kdbchk: fsbo(26) wrong, (hsz 24)Block 174 failed with check code 6129DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 1Total Blocks Failing (Data) : 1Total Blocks Processed (Index): 0Total Blocks Failing (Index): 0Total Blocks
Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBEDBBED> d /v offset 106File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 106 to 109 Dba:0x018000ae-------------------------------------------------------1a00781f l ..x.<16 bytes per line>BBED> modify /x 18 offset 106File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 106 to 109 Dba:0x018000ae------------------------------------------------------------------------1800781f<32 bytes per line>BBED> sum applyCheck value
for File 6, Block 174:current = 0x054d, required = 0x054dBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 174Block Checking: DBA = 25165998, Block Type = KTB-managed data blockdata header at 0x1112864kdbchk: row
count in table index incorrectBlock 174 failed with check code 6125DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 1Total Blocks Failing (Data) : 1Total Blocks Processed (Index): 0Total Blocks Failing (Index): 0Total Blocks
Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBEDBBED> p kdbtstruct kdbt[0], 4 bytes @114sb2 kdbtoffs @114 0sb2 kdbtnrow @116 1struct kdbt[1], 4 bytes @118sb2 kdbtoffs @118 1sb2 kdbtnrow @120 1BBED> p kdbt[1]struct kdbt[1], 4 bytes @118sb2 kdbtoffs @118 1sb2 kdbtnrow @120 1BBED> d /v offset 118
count 4File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 118 to 121 Dba:0x018000ae-------------------------------------------------------01000100 l ....<16 bytes per line>BBED> modify /x 000000 offset 118File: /oracle/oradata/roger/roger01.dbf (6)Block: 174 Offsets: 118 to 121 Dba:0x018000ae------------------------------------------------------------------------00000000<32 bytes per line>BBED> sum applyCheck value
for File 6, Block 174:current = 0x054d, required = 0x054dBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 174Block Checking: DBA = 25165998, Block Type = KTB-managed data blockdata header at 0x1112864kdbchk: table index offset incorrecttab 1Block 174 failed with check code 6124DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 1Total Blocks Failing (Data) : 1Total Blocks Processed (Index): 0Total Blocks Failing (Index): 0Total Blocks
Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBED |
我们能够看到,不管怎么改动,这个block通过bbed进行检測都报错。这里不是由于改动的不正确,而是由于
还须要改动cluster 上的Index信息。通过treedump 我们能够确认index block为file 6 block 187.
+++++ dump Index block
|
1
2
3
4
5
6
7
8
9
10
11
|
SQL> oradebug setmypidStatement processed.SQL> alter system dump datafile 6 block 187;System altered.SQL> oradebug close_traceStatement processed.SQL> oradebug tracefile_name/oracle/diag/rdbms/roger/roger/trace/roger_ora_17394.trcSQL> |
+++++ dump 内容例如以下
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Block header dump: 0x018000bbObject id on Block? Yseg/obj: 0x12ed2 csc: 0x00.b941a3 itc: 2 flg: E typ: 2 - INDEXbrn: 0 bdba: 0x18000b8 ver: 0x01 opc: 0inc: 0 exflg: 0Itl Xid Uba Flag Lck Scn/Fsc0x01 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.000000000x02 0x0009.002.0000044c 0x00c000f9.014a.1e --U- 1 fsc 0x0000.00b941a4Leaf block dump===============header address 140553058142820=0x7fd50f1a4a64kdxcolev 0KDXCOLEV Flags = - - -kdxcolok 0kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Ykdxconco 1kdxcosdc 0kdxconro 3kdxcofbo 42=0x2akdxcofeo 7993=0x1f39kdxcoavs 7951kdxlespl 0kdxlende 0kdxlenxt 0=0x0kdxleprv 0=0x0kdxledsz 8kdxlebksz 8032row#0[8019] flag: ------, lock: 0, len=13, data:(8): 01 80 00 ac 00 00 01 00col 0; len 2; (2): c1 02row#1[8006] flag: ------, lock: 0, len=13, data:(8): 01 80 00 ad 00 00 01 00col 0; len 2; (2): c1 03row#2[7993] flag: ------, lock: 2, len=13, data:(8): 01 80 00 ae 00 00 01 00col 0; len 2; (2): c1 09----- end of leaf block dump ----- |
能够看到,该index block中还存在3个index entry信息。我们须要将第3条信息给删掉,首先计算一下offset:
|
1
2
3
4
5
|
SQL> select
7993+76+24 from
dual;7993+76+24----------8093 |
+++++利用bbed改动 index block
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
BBED> set file 6 block 187FILE# 6BLOCK# 187BBED> mapFile: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Dba:0x018000bb------------------------------------------------------------KTB Data Block (Index Leaf)struct kcbh, 20 bytes @0struct ktbbh, 72 bytes @20struct kdxle, 32 bytes @100sb2 kd_off[3] @132ub1 freespace[7951] @138ub1 rowdata[39] @8089ub4 tailchk @8188BBED> set offset 8093OFFSET 8093BBED> x /rnrowdata[4] @8093----------flag@8093: 0x00 (NONE)lock@8094: 0x02keydata[8]: 0x01 0x80 0x00 0xae 0x00 0x00 0x01 0x00data key:col 0[2] @8104: 8BBED> mapFile: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Dba:0x018000bb------------------------------------------------------------KTB Data Block (Index Leaf)struct kcbh, 20 bytes @0struct ktbbh, 72 bytes @20struct kdxle, 32 bytes @100sb2 kd_off[3] @132ub1 freespace[7951] @138ub1 rowdata[39] @8089ub4 tailchk @8188BBED> p kdxlestruct kdxle, 32 bytes @100struct kdxlexco, 16 bytes @100ub1 kdxcolev @100 0x00ub1 kdxcolok @101 0x00ub1 kdxcoopc @102 0x80ub1 kdxconco @103 0x01ub4 kdxcosdc @104 0x00000000sb2 kdxconro @108 3sb2 kdxcofbo @110 42sb2 kdxcofeo @112 7993sb2 kdxcoavs @114 7951sb2 kdxlespl @116 0sb2 kdxlende @118 0ub4 kdxlenxt @120 0x00000000ub4 kdxleprv @124 0x00000000ub1 kdxledsz @128 0x08ub1 kdxleflg @129 0x00 (NONE)BBED> d /v offset 118 count 2File: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Offsets: 118 to 119 Dba:0x018000bb-------------------------------------------------------0000 l ..<16 bytes per line>BBED> modify /x 01 offset 118File: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Offsets: 118 to 119 Dba:0x018000bb------------------------------------------------------------------------0100<32 bytes per line>BBED> sum applyCheck value for File 6, Block 187:current = 0x4faa, required = 0x4faaBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 187Block Checking: DBA = 25166011, Block Type = KTB-managed data block**** actual rows marked deleted = 0 != kdxlende = 1---- end index block validationBlock 187 failed with check code 6401DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 0Total Blocks Failing (Data) : 0Total Blocks Processed (Index): 1Total Blocks Failing (Index): 1Total Blocks Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBEDBBED> set offset 8093OFFSET 8093BBED> x /rnrowdata[4] @8093----------flag@8093: 0x00 (NONE)lock@8094: 0x02keydata[8]: 0x01 0x80 0x00 0xae 0x00 0x00 0x01 0x00data key:col 0[2] @8104: 8BBED> modify /x 01 offset 8093File: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Offsets: 8093 to 8094 Dba:0x018000bb------------------------------------------------------------------------0102<32 bytes per line>BBED> sum applyCheck value for File 6, Block 187:current = 0x4eaa, required = 0x4eaaBBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 187Block Checking: DBA = 25166011, Block Type = KTB-managed data block**** actual free space credit for itl 2 = 15 != # in trans. hdr = 0---- end index block validationBlock 187 failed with check code 6401DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 0Total Blocks Failing (Data) : 0Total Blocks Processed (Index): 1Total Blocks Failing (Index): 1Total Blocks Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBEDBBED> mapFile: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Dba:0x018000bb------------------------------------------------------------KTB Data Block (Index Leaf)struct kcbh, 20 bytes @0struct ktbbh, 72 bytes @20struct kdxle, 32 bytes @100sb2 kd_off[3] @132ub1 freespace[7951] @138ub1 rowdata[39] @8089ub4 tailchk @8188BBED> p ktbbhstruct ktbbh, 72 bytes @20ub1 ktbbhtyp @20 0x02 (KDDBTINDEX)union ktbbhsid, 4 bytes @24ub4 ktbbhsg1 @24 0x00012ed2ub4 ktbbhod1 @24 0x00012ed2struct ktbbhcsc, 8 bytes @28ub4 kscnbas @28 0x00b941a3ub2 kscnwrp @32 0x0000sb2 ktbbhict @36 2ub1 ktbbhflg @38 0x32 (NONE)ub1 ktbbhfsl @39 0x00ub4 ktbbhfnx @40 0x018000b8struct ktbbhitl[0], 24 bytes @44struct ktbitxid, 8 bytes @44ub2 kxidusn @44 0x0000ub2 kxidslt @46 0x0000ub4 kxidsqn @48 0x00000000struct ktbituba, 8 bytes @52ub4 kubadba @52 0x00000000ub2 kubaseq @56 0x0000ub1 kubarec @58 0x00ub2 ktbitflg @60 0x0000 (NONE)union _ktbitun, 2 bytes @62sb2 _ktbitfsc @62 0ub2 _ktbitwrp @62 0x0000ub4 ktbitbas @64 0x00000000struct ktbbhitl[1], 24 bytes @68struct ktbitxid, 8 bytes @68ub2 kxidusn @68 0x0009ub2 kxidslt @70 0x0002ub4 kxidsqn @72 0x0000044cstruct ktbituba, 8 bytes @76ub4 kubadba @76 0x00c000f9ub2 kubaseq @80 0x014aub1 kubarec @82 0x1eub2 ktbitflg @84 0x2001 (KTBFUPB)union _ktbitun, 2 bytes @86sb2 _ktbitfsc @86 0ub2 _ktbitwrp @86 0x0000ub4 ktbitbas @88 0x00b941a4BBED> d /v offset 86 count 2File: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Offsets: 86 to 87 Dba:0x018000bb-------------------------------------------------------0000 l ..<16 bytes per line>BBED> modify /x 0f offset 86File: /oracle/oradata/roger/roger01.dbf (6)Block: 187 Offsets: 86 to 87 Dba:0x018000bb------------------------------------------------------------------------0f00<32 bytes per line>BBED> sum applyCheck value for File 6, Block 187:current = 0x4ea5, required = 0x4ea5BBED> verifyDBVERIFY - Verification startingFILE = /oracle/oradata/roger/roger01.dbfBLOCK = 187DBVERIFY - Verification completeTotal Blocks Examined : 1Total Blocks Processed (Data) : 0Total Blocks Failing (Data) : 0Total Blocks Processed (Index): 1Total Blocks Failing (Index): 0Total Blocks Empty : 0Total Blocks Marked Corrupt : 0Total Blocks Influx : 0Message 531 not found; product=RDBMS; facility=BBED |
到这里。我们完毕了Index Block的改动。最后我们再来校验一下前面的data block,你会发现已经ok了。例如以下:
BBED> set file 2 block 174
FILE# 2
BLOCK# 174
BBED> verify
DBVERIFY – Verification starting
FILE = /oracle/oradata/roger/sysaux01.dbf
BLOCK = 174
DBVERIFY – Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 0
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 1
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
Message 531 not found; product=RDBMS; facility=BBED
BBED>
+++++ 最后来验证下数据
|
1
2
3
4
5
6
7
8
9
10
|
SQL> alter
system flush buffer_cache;System altered.SQL> select
* from
roger.t_0610;ID NAME---------- -------------1 baidu2 google |
到目前为止。整个模拟测试结束,以供参考!
版权声明:本文博主原创文章。博客,未经同意不得转载。
标签:
原文地址:http://www.cnblogs.com/lcchuguo/p/4804076.html