Oracle 如何提交手册Cluster Table事务
环境遇到ora-00600 4000错误,该目的是参与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
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/roger Connected. SQL> create cluster t_cluster(id number(2)) ; Cluster created. SQL> create table t_0610
2 (id number(2) primary key ,
3 name varchar2(13))
4 cluster t_cluster(id); Table
SQL> create index t_cluster_idx on cluster t_cluster; Index
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
SQL> select * from
ID NAME ---------- -------------
1 baidu
2 google
8 roger SQL> select dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) blk#
2 from t_0610; FILE# BLK# ---------- ----------
6 172
6 173
6 174 SQL> oradebug setmypid ORA-01031: insufficient privileges SQL> conn / as sysdba Connected. SQL> oradebug setmypid Statement processed. SQL> alter system flush buffer_cache; System altered. SQL> alter system dump datafile 6 block 172; System altered. SQL> oradebug close_trace Statement 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=25165996 BH (0x71bf2f28) file#: 6 rdba: 0x018000ac (6/172) class: 1 ba: 0x71ad8000
set: 3 pool: 3 bsz: 8192 bsi: 0 sflg: 2 pwc: 0,15
dbwrid: 0 obj: 77519 objn: 77520 tsn: 7 afn: 6 hint: f
hash: [0x8abfa738,0x8abfa738] lru: [0x74ff33a0,0x7abf47d0]
lru-flags: on_auxiliary_list
ckptq: [NULL] fileq: [NULL] objq: [NULL] objaq: [NULL]
st: FREE md: NULL fpin: 'ktspbwh2: ktspfmdb' tch: 0 lfb: 33
flags: Block dump from disk: buffer tsn: 7 rdba: 0x018000ac (6/172) scn: 0x0000.00b941a6 seq: 0x01 flg: 0x06 tail: 0x41a60601 frmt: 0x02 chkval: 0xcb52 type: 0x06=trans data Hex dump of block: st=0, typ_found=1 Dump of memory from 0x00007FADB771EA00 to 0x00007FADB7720A00 7FADB771EA00 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 times 7FADB77209D0 00000000 00000000 00000000 0001026C [............l...] 7FADB77209E0 69616205 00AC7564 01000101 00800100 [.baidu..........] 7FADB77209F0 010000AC 00AC0080 02C10200 41A60601 [...............A] Block header dump: 0x018000ac
Object id on Block? Y
seg/obj: 0x12ecf csc: 0x00.b94199 itc: 2 flg: E typ: 1 - DATA
brn: 0 bdba: 0x18000a8 ver: 0x01 opc: 0
inc: 0 exflg: 0 Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x0006.008.00000515 0x00c00562.014e.2e C--- 0 scn 0x0000.00b94198 0x02 0x0007.01d.000004c9 0x00c03c08.019d.32 --U- 1 fsc 0x0000.00b941a6 bdba: 0x018000ac data_block_dump,data header at 0x7fadb771ea64 =============== tsiz: 0x1f98 hsiz: 0x1a pbl: 0x7fadb771ea64
76543210 flag=-------K ntab=2 ---- > 大于2,说明这是一个cluster table nrow=2 frre=-1 fsbo=0x1a fseo=0x1f78 avsp=0x1f5e tosp=0x1f5e 0xe:pti[0] nrow=1 offs=0 0x12:pti[1] nrow=1 offs=1 0x16:pri[0] offs=0x1f82 0x18:pri[1] offs=0x1f78 block_row_dump: tab 0, row 0, @0x1f82 tl: 22 fb: K-H-FL-- lb: 0x0 cc: 1 curc: 1 comc: 1 pk: 0x018000ac.0 nk: 0x018000ac.0 col 0: [ 2] c1 02 tab 1, row 0, @0x1f78 tl: 10 fb: -CH-FL-- lb: 0x2 cc: 1 cki: 0 col 0: [ 5] 62 61 69 64 75 end_of_block_dump End 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 user USER "SYS" SQL> conn roger/roger Connected. 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 20 SQL> |
这里我们能够看到对于这个未提交的事务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 174
FILE# 6
BLOCK# 174 BBED> map File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Dba:0x018000ae ------------------------------------------------------------
KTB Data Block (Table/Cluster) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdbh, 14 bytes @100 struct kdbt[2], 8 bytes @114 sb2 kdbr[2] @122 ub1 freespace[8030] @126 ub1 rowdata[32] @8156 ub4 tailchk @8188 BBED> p kdbr sb2 kdbr[0] @122 8066 sb2 kdbr[1] @124 8056 BBED> p ktbbh struct ktbbh, 72 bytes @20 ub1 ktbbhtyp @20 0x01 (KDDBTDATA)
union ktbbhsid, 4 bytes @24 ub4 ktbbhsg1 @24 0x00012ecf
ub4 ktbbhod1 @24 0x00012ecf
struct ktbbhcsc, 8 bytes @28 ub4 kscnbas @28 0x00b94309
ub2 kscnwrp @32 0x0000
sb2 ktbbhict @36 2
ub1 ktbbhflg @38 0x32 (NONE)
ub1 ktbbhfsl @39 0x00
ub4 ktbbhfnx @40 0x018000a8
struct ktbbhitl[0], 24 bytes @44 struct ktbitxid, 8 bytes @44 ub2 kxidusn @44 0x0009
ub2 kxidslt @46 0x0002
ub4 kxidsqn @48 0x0000044c
struct ktbituba, 8 bytes @52 ub4 kubadba @52 0x00c000f9
ub2 kubaseq @56 0x014a
ub1 kubarec @58 0x1d
ub2 ktbitflg @60 0x8000 (KTBFCOM)
union _ktbitun, 2 bytes @62 sb2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x00b941a4
struct ktbbhitl[1], 24 bytes @68 struct ktbitxid, 8 bytes @68 ub2 kxidusn @68 0x0003
ub2 kxidslt @70 0x0011
ub4 kxidsqn @72 0x000004bc
struct ktbituba, 8 bytes @76 ub4 kubadba @76 0x00c0042a
ub2 kubaseq @80 0x0185
ub1 kubarec @82 0x13
ub2 ktbitflg @84 0x0001 (NONE)
union _ktbitun, 2 bytes @86 sb2 _ktbitfsc @86 6
ub2 _ktbitwrp @86 0x0006
ub4 ktbitbas @88 0x00000000 BBED> modify /x 0180 Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 84 to 87 Dba:0x018000ae ------------------------------------------------------------------------
01800600 <32 bytes per line>
BBED> modify /x 00 offset 86
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 86 to 87 Dba:0x018000ae ------------------------------------------------------------------------
0000 <32 bytes per line> BBED> sum apply Check value for File 6, Block 174: current = 0x055c, required = 0x055c BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 174 Block Checking: DBA = 25165998, Block Type = KTB-managed data block data header at 0x7f88d49c1264 kdbchk: row locked by non-existent transaction
table=1 slot=0
lockid=2 ktbbhitc=2 Block 174 failed with check code 6101 BBED> p *kdbr[1] rowdata[0] ---------- ub1 rowdata[0] @8156 0x7c BBED> x /rnnnnccccccnnnnnnnnnnn rowdata[0] @8156 ---------- flag@8156: 0x7c (KDRHFL, KDRHFF, KDRHFD, KDRHFH, KDRHFC) lock@8157: 0x02 cols@8158: 0 BBED> modify /x 6c offset 8156
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 8156 to 8159 Dba:0x018000ae ------------------------------------------------------------------------
6c020100 <32 bytes per line> BBED> sum apply Check value for File 6, Block 174: current = 0x054c, required = 0x054c BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 174 Block Checking: DBA = 25165998, Block Type = KTB-managed data block data header at 0x1112864 kdbchk: row locked by non-existent transaction
table=1 slot=0
lockid=2 ktbbhitc=2 Block 174 failed with check code 6101 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 Message 531 not found; product=RDBMS; facility=BBED BBED> p kdbh struct kdbh, 14 bytes @100 ub1 kdbhflag @100 0x01 (KDBHFFK)
sb1 kdbhntab @101 2
sb2 kdbhnrow @102 2
sb2 kdbhfrre @104 -1
sb2 kdbhfsbo @106 26
sb2 kdbhfseo @108 8056
sb2 kdbhavsp @110 8030
sb2 kdbhtosp @112 8040 BBED> d /v offset 102 count 4
File: /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 102
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 102 to 105 Dba:0x018000ae ------------------------------------------------------------------------
0100ffff <32 bytes per line> BBED> sum apply Check value for File 6, Block 174: current = 0x054f, required = 0x054f BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 174 Block Checking: DBA = 25165998, Block Type = KTB-managed data block data header at 0x1112864 kdbchk: fsbo(26) wrong, (hsz 24) Block 174 failed with check code 6129 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 Message 531 not found; product=RDBMS; facility=BBED BBED> d /v offset 106 File: /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 106
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 106 to 109 Dba:0x018000ae ------------------------------------------------------------------------
1800781f <32 bytes per line> BBED> sum apply Check value for File 6, Block 174: current = 0x054d, required = 0x054d BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 174 Block Checking: DBA = 25165998, Block Type = KTB-managed data block data header at 0x1112864 kdbchk: row count in table index incorrect Block 174 failed with check code 6125 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 Message 531 not found; product=RDBMS; facility=BBED BBED> p kdbt struct kdbt[0], 4 bytes @114 sb2 kdbtoffs @114 0
sb2 kdbtnrow @116 1 struct kdbt[1], 4 bytes @118 sb2 kdbtoffs @118 1
sb2 kdbtnrow @120 1 BBED> p kdbt[1] struct kdbt[1], 4 bytes @118 sb2 kdbtoffs @118 1
sb2 kdbtnrow @120 1 BBED> d /v offset 118 count 4
File: /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 118
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 174 Offsets: 118 to 121 Dba:0x018000ae ------------------------------------------------------------------------
00000000 <32 bytes per line> BBED> sum apply Check value for File 6, Block 174: current = 0x054d, required = 0x054d BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 174 Block Checking: DBA = 25165998, Block Type = KTB-managed data block data header at 0x1112864 kdbchk: table index offset incorrect
tab 1 Block 174 failed with check code 6124 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 Message 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 setmypid Statement processed. SQL> alter system dump datafile 6 block 187; System altered. SQL> oradebug close_trace Statement processed. SQL> oradebug tracefile_name /oracle/diag/rdbms/roger/roger/trace/roger_ora_17394.trc SQL> |
+++++ 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: 0x018000bb
Object id on Block? Y
seg/obj: 0x12ed2 csc: 0x00.b941a3 itc: 2 flg: E typ: 2 - INDEX
brn: 0 bdba: 0x18000b8 ver: 0x01 opc: 0
inc: 0 exflg: 0 Itl Xid Uba Flag Lck Scn/Fsc 0x01 0x0000.000.00000000 0x00000000.0000.00 ---- 0 fsc 0x0000.00000000 0x02 0x0009.002.0000044c 0x00c000f9.014a.1e --U- 1 fsc 0x0000.00b941a4 Leaf block dump =============== header address 140553058142820=0x7fd50f1a4a64 kdxcolev 0 KDXCOLEV Flags = - - - kdxcolok 0 kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y kdxconco 1 kdxcosdc 0 kdxconro 3 kdxcofbo 42=0x2a kdxcofeo 7993=0x1f39 kdxcoavs 7951 kdxlespl 0 kdxlende 0 kdxlenxt 0=0x0 kdxleprv 0=0x0 kdxledsz 8 kdxlebksz 8032 row#0[8019] flag: ------, lock: 0, len=13, data:(8): 01 80 00 ac 00 00 01 00 col 0; len 2; (2): c1 02 row#1[8006] flag: ------, lock: 0, len=13, data:(8): 01 80 00 ad 00 00 01 00 col 0; len 2; (2): c1 03 row#2[7993] flag: ------, lock: 2, len=13, data:(8): 01 80 00 ae 00 00 01 00 col 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
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 187
FILE# 6
BLOCK# 187 BBED> map
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Dba:0x018000bb ------------------------------------------------------------
KTB Data Block (Index Leaf) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdxle, 32 bytes @100 sb2 kd_off[3] @132 ub1 freespace[7951] @138 ub1 rowdata[39] @8089 ub4 tailchk @8188 BBED> set offset 8093
OFFSET 8093 BBED> x /rn rowdata[4] @8093 ---------- flag@8093: 0x00 (NONE) lock@8094: 0x02 keydata[8]: 0x01 0x80 0x00 0xae 0x00 0x00 0x01 0x00 data key: col 0[2] @8104: 8 BBED> map
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Dba:0x018000bb ------------------------------------------------------------
KTB Data Block (Index Leaf) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdxle, 32 bytes @100 sb2 kd_off[3] @132 ub1 freespace[7951] @138 ub1 rowdata[39] @8089 ub4 tailchk @8188 BBED> p kdxle struct kdxle, 32 bytes @100 struct kdxlexco, 16 bytes @100 ub1 kdxcolev @100 0x00
ub1 kdxcolok @101 0x00
ub1 kdxcoopc @102 0x80
ub1 kdxconco @103 0x01
ub4 kdxcosdc @104 0x00000000
sb2 kdxconro @108 3
sb2 kdxcofbo @110 42
sb2 kdxcofeo @112 7993
sb2 kdxcoavs @114 7951
sb2 kdxlespl @116 0
sb2 kdxlende @118 0
ub4 kdxlenxt @120 0x00000000
ub4 kdxleprv @124 0x00000000
ub1 kdxledsz @128 0x08
ub1 kdxleflg @129 0x00 (NONE) BBED> d /v offset 118 count 2
File: /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 118
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Offsets: 118 to 119 Dba:0x018000bb ------------------------------------------------------------------------
0100 <32 bytes per line> BBED> sum apply Check value for File 6, Block 187: current = 0x4faa, required = 0x4faa BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 187 Block Checking: DBA = 25166011, Block Type = KTB-managed data block **** actual rows marked deleted = 0 != kdxlende = 1 ---- end index block validation Block 187 failed with check code 6401 DBVERIFY - Verification complete Total Blocks Examined : 1 Total Blocks Processed (Data) : 0 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 1 Total Blocks Failing (Index): 1 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 531 not found; product=RDBMS; facility=BBED BBED> set offset 8093
OFFSET 8093 BBED> x /rn rowdata[4] @8093 ---------- flag@8093: 0x00 (NONE) lock@8094: 0x02 keydata[8]: 0x01 0x80 0x00 0xae 0x00 0x00 0x01 0x00 data key: col 0[2] @8104: 8 BBED> modify /x 01 offset 8093
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Offsets: 8093 to 8094 Dba:0x018000bb ------------------------------------------------------------------------
0102 <32 bytes per line> BBED> sum apply Check value for File 6, Block 187: current = 0x4eaa, required = 0x4eaa BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 187 Block Checking: DBA = 25166011, Block Type = KTB-managed data block **** actual free space credit for itl 2 = 15 != # in trans. hdr = 0 ---- end index block validation Block 187 failed with check code 6401 DBVERIFY - Verification complete Total Blocks Examined : 1 Total Blocks Processed (Data) : 0 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 1 Total Blocks Failing (Index): 1 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 531 not found; product=RDBMS; facility=BBED BBED> map
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Dba:0x018000bb ------------------------------------------------------------
KTB Data Block (Index Leaf) struct kcbh, 20 bytes @0 struct ktbbh, 72 bytes @20 struct kdxle, 32 bytes @100 sb2 kd_off[3] @132 ub1 freespace[7951] @138 ub1 rowdata[39] @8089 ub4 tailchk @8188 BBED> p ktbbh struct ktbbh, 72 bytes @20 ub1 ktbbhtyp @20 0x02 (KDDBTINDEX)
union ktbbhsid, 4 bytes @24 ub4 ktbbhsg1 @24 0x00012ed2
ub4 ktbbhod1 @24 0x00012ed2
struct ktbbhcsc, 8 bytes @28 ub4 kscnbas @28 0x00b941a3
ub2 kscnwrp @32 0x0000
sb2 ktbbhict @36 2
ub1 ktbbhflg @38 0x32 (NONE)
ub1 ktbbhfsl @39 0x00
ub4 ktbbhfnx @40 0x018000b8
struct ktbbhitl[0], 24 bytes @44 struct ktbitxid, 8 bytes @44 ub2 kxidusn @44 0x0000
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 0x0000 (NONE)
union _ktbitun, 2 bytes @62 sb2 _ktbitfsc @62 0
ub2 _ktbitwrp @62 0x0000
ub4 ktbitbas @64 0x00000000
struct ktbbhitl[1], 24 bytes @68 struct ktbitxid, 8 bytes @68 ub2 kxidusn @68 0x0009
ub2 kxidslt @70 0x0002
ub4 kxidsqn @72 0x0000044c
struct ktbituba, 8 bytes @76 ub4 kubadba @76 0x00c000f9
ub2 kubaseq @80 0x014a
ub1 kubarec @82 0x1e
ub2 ktbitflg @84 0x2001 (KTBFUPB)
union _ktbitun, 2 bytes @86 sb2 _ktbitfsc @86 0
ub2 _ktbitwrp @86 0x0000
ub4 ktbitbas @88 0x00b941a4 BBED> d /v offset 86 count 2
File: /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 86
File: /oracle/oradata/roger/roger01.dbf (6)
Block: 187 Offsets: 86 to 87 Dba:0x018000bb ------------------------------------------------------------------------
0f00 <32 bytes per line> BBED> sum apply Check value for File 6, Block 187: current = 0x4ea5, required = 0x4ea5 BBED> verify DBVERIFY - Verification starting FILE = /oracle/oradata/roger/roger01.dbf BLOCK = 187 DBVERIFY - Verification complete Total Blocks Examined : 1 Total Blocks Processed (Data) : 0 Total Blocks Failing (Data) : 0 Total Blocks Processed (Index): 1 Total Blocks Failing (Index): 0 Total Blocks Empty : 0 Total Blocks Marked Corrupt : 0 Total Blocks Influx : 0 Message 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
ID NAME ---------- -------------
1 baidu
2 google |
到目前为止。整个模拟测试结束,以供参考!
版权声明:本文博主原创文章。博客,未经同意不得转载。
Oracle 如何提交手册Cluster Table事务的更多相关文章
- ORACLE日常操作手册
转发自:http://blog.csdn.net/lichangzai/article/details/7955766 以前为开发人员编写的oracle基础操作手册,都基本的oracle操作和SQL语 ...
- [20181226]简单探究cluster table.txt
[20181226]简单探究cluster table.txt --//简单探究cluster table.以前也做过,有点生疏了. 1.环境:SCOTT@book> @ ver1PORT_ST ...
- MySQL 事务提交 --不良好的事务习惯。
MySQL 事务提交 --不良好的事务习惯 我们知道"事务"是数据库区别于文件系统的重要特性之一.MySQL的InnoDB引擎中的事务也完全符合ACID(原子性 一致性 隔离性 持 ...
- Cluster table 与性能
用户数据行存储在文件系统中的堆文件中,而这些行以不确定的顺序存储.如果表最初以插入/复制的顺序加载,那么以后的插入.更新和删除将导致在堆文件中以不可预测的顺序添加行.创建索引创建一个指向堆行的辅助文件 ...
- 聚簇(Cluster)和聚簇表(Cluster Table)
聚簇(Cluster)和聚簇表(Cluster Table) 时间:2010-03-13 23:12来源:OralanDBA.CN 作者:AlanSawyer 点击:157次 1.创建聚簇 icmad ...
- 简述Oracle IOT(Index Organized Table)
转:http://blog.itpub.net/17203031/viewspace-744477 对关系型数据库产品(RDBMS)而言,一个重要特性就是:数据信息都被组织为二维数据表,信息的表达可以 ...
- mysql,oracle,sql server中的默认事务隔离级别查看,更改
未提交读(隔离事务的最低级别,只能保证不读取物理上损坏的数据) 已提交读(数据库引擎的默认级别) 可重复读 可序列化(隔离事务的最高级别,事务之间完全隔离) 可串行化比较严谨,级别高; MySQL m ...
- MySQL binlog 组提交与 XA(分布式事务、两阶段提交)【转】
概念: XA(分布式事务)规范主要定义了(全局)事务管理器(TM: Transaction Manager)和(局部)资源管理器(RM: Resource Manager)之间的接口.XA为了实现分布 ...
- ORACLE ORA-01653: unable to extend table 的错误
ORACLE ORA-01653: unable to extend table 的错误 今天用PL SQL Developer往oracle数据库中导入数据时,突然报错,只能终止,错误的具体内容如下 ...
随机推荐
- C#之网络
首先很不好意思,前段时间把评论的功能给关掉啦,BUT NOW 此功能以开放,欢迎小伙伴们拍砖. 1网络 在网络环境下,我们最感兴趣的两个名称空间是System.Net和System.Net.Socke ...
- MyBatis一级缓存引起的无穷递归
MyBatis一级缓存引起的无穷递归 引言: 最近在项目中参与了一个领取优惠劵的活动,当多个用户领取同一张优惠劵的时候,使用了数据库锁控制并发,起初的设想是:如果多个人同时领一张劵,第一个到达的人领取 ...
- 基于.net开发chrome核心浏览器【四】
原文:基于.net开发chrome核心浏览器[四] 一: 上周去北京出差,给国家电网的项目做架构方案,每天都很晚睡,客户那边的副总也这样拼命工作. 累的不行了,直接导致第四篇文章没有按时发出来. 希望 ...
- html中滚动栏的样式
DIV滚动栏设置 (CSS)2008/09/26 03:07div 中滚动栏的控制2008年01月06日 星期日 01:181)隐藏滚动栏<body style="overflow-x ...
- struts2 Session拦截器
一:struts2简介 二:拦截器
- java大全经典的书面采访
果学网 -专注IT在线www.prismcollege.com 1.面向对象的特征有哪些方面 1.抽象: 抽象就是忽略一个主题中与当前目标无关的那些方面.以便更充分地注意与当前目标有关的方面.抽象并 ...
- Codeforces Round #253 (Div. 1) B. Andrey and Problem
B. Andrey and Problem time limit per test 2 seconds memory limit per test 256 megabytes input standa ...
- (摘录)SQL Server 存储过程
文章摘录:http://www.cnblogs.com/hoojo/archive/2011/07/19/2110862.html SQL Server 存储过程 Transact-SQL中的存储过程 ...
- proxy pattern 代理模式
常用的几种代理模式简要说明如下: (1) 远程代理(Remote Proxy):为一个位于不同的地址空间的对象提供一个本地的代理对象,这个不同的地址空间可以是在同一台主机中,也可是在另一台主机中,远 ...
- CSS+DIV+HTML(一)--HTML总结
一.定义 HTML(Hyper Text Markup Language),标记语言. 二.主要内容: HTML元素分为三类:块级标签.内联标签.可变标签.差别在于: 块级元素:在默认情况下会换行显示 ...