sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 故障案例 >

【案例】Oracle数据库dbv检查坏块时报错代码:6107解决办法

时间:2016-10-24 21:06   来源:Oracle研究中心   作者:HTZ   点击:

天萃荷净 Oracle研究中心案例分析:分享一篇关于Oracle数据库遇到坏块在使用DBV检查时发现:6107报错的产生原因和解决办法。
下面是来至其它实验中的一部分,关于verify验证块中,报错

[oracle@oracleplus.net tmp]$bbed
Password:

BBED: Release 2.0.0.0.0 – Limited Production on Fri Jun 20 07:33:29 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> set filename ‘/tmp/system01.dbf’;
FILENAME /tmp/system01.dbf

BBED> set block 3008
BLOCK# 3008
BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98c6525c
kdbchk: there are free slots not on the free list
nfree=3
Block 3008 failed with check code 6107
这里报错的提示是有一些行没有在free list上面,意思是有一行删除本来是被删除了的,但是仍然存在。
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 @92
ub1 kdbhflag @92 0x01 (KDBHFFK)
sb1 kdbhntab @93 3
sb2 kdbhnrow @94 187
sb2 kdbhfrre @96 -1
sb2 kdbhfsbo @98 400
sb2 kdbhfseo @100 401
sb2 kdbhavsp @102 1
sb2 kdbhtosp @104 1

BBED> p kdbt
struct kdbt[0], 4 bytes @106
sb2 kdbtoffs @106 0
sb2 kdbtnrow @108 26
struct kdbt[1], 4 bytes @110
sb2 kdbtoffs @110 26
sb2 kdbtnrow @112 80
struct kdbt[2], 4 bytes @114
sb2 kdbtoffs @114 106
sb2 kdbtnrow @116 81
这里可以看到剩余空间开始的位置是从400开始,结束位置是401结束的,意味着低400以下的行,其实都是不应该存在的。这里也可以看到表中有2个表,一共是187行,kdbh与kdbt中行记录数相等。
下面看一下kdbr的记录
BBED> p kdbr
sb2 kdbr[0] @118 8073
sb2 kdbr[1] @120 7711
sb2 kdbr[2] @122 7514
sb2 kdbr[3] @124 7405
sb2 kdbr[4] @126 7296
sb2 kdbr[5] @128 7094
sb2 kdbr[6] @130 6892
sb2 kdbr[7] @132 6693
sb2 kdbr[8] @134 6584
sb2 kdbr[9] @136 6035
sb2 kdbr[10] @138 5927
sb2 kdbr[11] @140 5818
sb2 kdbr[12] @142 5709
sb2 kdbr[13] @144 5513
sb2 kdbr[14] @146 5137
sb2 kdbr[15] @148 4936
sb2 kdbr[16] @150 4739
sb2 kdbr[17] @152 4455
sb2 kdbr[18] @154 4345
sb2 kdbr[19] @156 4063
sb2 kdbr[20] @158 3774
sb2 kdbr[21] @160 3217
sb2 kdbr[22] @162 3015
sb2 kdbr[23] @164 2352
sb2 kdbr[24] @166 1697
sb2 kdbr[25] @168 1049
sb2 kdbr[26] @170 8004
sb2 kdbr[27] @172 7912
sb2 kdbr[28] @174 7823
sb2 kdbr[29] @176 7734
sb2 kdbr[30] @178 7624
sb2 kdbr[31] @180 7537
sb2 kdbr[32] @182 7428
sb2 kdbr[33] @184 7319
sb2 kdbr[34] @186 7206
sb2 kdbr[35] @188 7117
sb2 kdbr[36] @190 7004
sb2 kdbr[37] @192 6915
sb2 kdbr[38] @194 6806
sb2 kdbr[39] @196 6716
sb2 kdbr[40] @198 6607
sb2 kdbr[41] @200 6493
sb2 kdbr[42] @202 6406
sb2 kdbr[43] @204 6320
sb2 kdbr[44] @206 6233
sb2 kdbr[45] @208 6146
sb2 kdbr[46] @210 6058
sb2 kdbr[47] @212 5950
sb2 kdbr[48] @214 5841
sb2 kdbr[49] @216 5732
sb2 kdbr[50] @218 5625
sb2 kdbr[51] @220 5536
sb2 kdbr[52] @222 5427
sb2 kdbr[53] @224 5338
sb2 kdbr[54] @226 5250
sb2 kdbr[55] @228 5160
sb2 kdbr[56] @230 5047
sb2 kdbr[57] @232 4959
sb2 kdbr[58] @234 4850
sb2 kdbr[59] @236 4762
sb2 kdbr[60] @238 4653
sb2 kdbr[61] @240 4564
sb2 kdbr[62] @242 4478
sb2 kdbr[63] @244 4368
sb2 kdbr[64] @246 4258
sb2 kdbr[65] @248 4172
sb2 kdbr[66] @250 4086
sb2 kdbr[67] @252 3977
sb2 kdbr[68] @254 3889
sb2 kdbr[69] @256 3797
sb2 kdbr[70] @258 3688
sb2 kdbr[71] @260 3598
sb2 kdbr[72] @262 3509
sb2 kdbr[73] @264 3422
sb2 kdbr[74] @266 3332
sb2 kdbr[75] @268 3240
sb2 kdbr[76] @270 3131
sb2 kdbr[77] @272 3038
sb2 kdbr[78] @274 2929
sb2 kdbr[79] @276 2839
sb2 kdbr[80] @278 2748
sb2 kdbr[81] @280 2653
sb2 kdbr[82] @282 2562
sb2 kdbr[83] @284 2467
sb2 kdbr[84] @286 2375
sb2 kdbr[85] @288 2266
sb2 kdbr[86] @290 2176
sb2 kdbr[87] @292 2090
sb2 kdbr[88] @294 1998
sb2 kdbr[89] @296 1907
sb2 kdbr[90] @298 1812
sb2 kdbr[91] @300 1720
sb2 kdbr[92] @302 1611
sb2 kdbr[93] @304 1521
sb2 kdbr[94] @306 1432
sb2 kdbr[95] @308 1346
sb2 kdbr[96] @310 1254
sb2 kdbr[97] @312 1161
sb2 kdbr[98] @314 1072
sb2 kdbr[99] @316 963
sb2 kdbr[100] @318 873
sb2 kdbr[101] @320 784
sb2 kdbr[102] @322 698
sb2 kdbr[103] @324 606
sb2 kdbr[104] @326 514
sb2 kdbr[105] @328 418
sb2Oracleoracleplus.net kdbr[106] @330 51
sb2 kdbr[107] @332 215
sb2 kdbr[108] @334 126
sb2 kdbr[109] @336 7694
sb2 kdbr[110] @338 7607
sb2 kdbr[111] @340 7497
sb2 kdbr[112] @342 7388
sb2 kdbr[113] @344 7279
sb2 kdbr[114] @346 7189
sb2 kdbr[115] @348 7077
sb2 kdbr[116] @350 6987
sb2 kdbr[117] @352 6875
sb2 kdbr[118] @354 6789
sb2 kdbr[119] @356 6676
sb2 kdbr[120] @358 6567
sb2 kdbr[121] @360 6476
sb2 kdbr[122] @362 6389
sb2 kdbr[123] @364 6303
sb2 kdbr[124] @366 6216
sb2 kdbr[125] @368 6129
sb2 kdbr[126] @370 6016
sb2 kdbr[127] @372 5997
sb2 kdbr[128] @374 5910
sb2 kdbr[129] @376 5801
sb2 kdbr[130] @378 5693
sb2 kdbr[131] @380 5608
sb2 kdbr[132] @382 5496
sb2 kdbr[133] @384 5410
sb2 kdbr[134] @386 5321
sb2 kdbr[135] @388 5233
sb2 kdbr[136] @390 5120
sb2 kdbr[137] @392 5030
sb2 kdbr[138] @394 4919
sb2 kdbr[139] @396 4833
sb2 kdbr[140] @398 4722
sb2 kdbr[141] @400 4636
sb2 kdbr[142] @402 4547
sb2 kdbr[143] @404 4438
sb2 kdbr[144] @406 4328
sb2 kdbr[145] @408 4241
sb2 kdbr[146] @410 4155
sb2 kdbr[147] @412 4046
sb2 kdbr[148] @414 3960
sb2 kdbr[149] @416 3872
sb2 kdbr[150] @418 3757
sb2 kdbr[151] @420 3671
sb2 kdbr[152] @422 3581
sb2 kdbr[153] @424 3492
sb2 kdbr[154] @426 3405
sb2 kdbr[155] @428 3315
sb2 kdbr[156] @430 3200
sb2 kdbr[157] @432 3114
sb2 kdbr[158] @434 2998
sb2 kdbr[159] @436 2912
sb2 kdbr[160] @438 2822
sb2 kdbr[161] @440 2731
sb2 kdbr[162] @442 2636
sb2 kdbr[163] @444 2545
sb2 kdbr[164] @446 2450
sb2 kdbr[165] @448 2335
sb2 kdbr[166] @450 2249
sb2 kdbr[167] @452 2159
sb2 kdbr[168] @454 2073
sb2 kdbr[169] @456 1981
sb2 kdbr[170] @458 1890
sb2 kdbr[171] @460 1795
sb2 kdbr[172] @462 1680
sb2 kdbr[173] @464 1594
sb2 kdbr[174] @466 1504
sb2 kdbr[175] @468 1415
sb2 kdbr[176] @470 1329
sb2 kdbr[177] @472 1237
sb2 kdbr[178] @474 1144
sb2 kdbr[179] @476 1032
sb2 kdbr[180] @478 946
sb2 kdbr[181] @480 856
sb2 kdbr[182] @482 767
sb2 kdbr[183] @484 681
sb2 kdbr[184] @486 589
sb2 kdbr[185] @488 497
sb2 kdbr[186] @490 401
这里我们发现了黄色部分的内容,存在的数据低于剩余空间开始的位置,说明这三行是不需要的。
下面我们看一下这三行的值
BBED> x /r kdbr[106]
kdbr[106] @330
———
flag@330: 0x33 (KDRHFN, KDRHFP, KDRHFD, KDRHFH)
lock@331: 0x00
cols@332: 0
从这里我们可以看到,此行记录中cols为0,代表的是此行上没有任何的列的内容。
下面开始修改
BBED> p kdbh
struct kdbh, 14 bytes @92
ub1 kdbhflag @92 0x01 (KDBHFFK)
sb1 kdbhntab @93 3
sb2 kdbhnrow @94 187
sb2 kdbhfrre @96 -1
sb2 kdbhfsbo @98 400
sb2 kdbhfseo @100 401
sb2 kdbhavsp @102 1
sb2 kdbhtosp @104 1

BBED> set offset 96
OFFSET 96

就是存放106号的行偏移量的位置,这里将kdbhfrre更改为106的位置,代表中第一行包含空闲行的位置

BBED> modify /x 6a00
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 96 to 607 Dba:0x00000000
————————————————————————
6a009001 91010100 01000000 1a001a00 50006a00 5100891f 1f1e5a1d ed1c801c
BBED> p kdbh
struct kdbh, 14 bytes @92
ub1 kdbhflag @92 0x01 (KDBHFFK)
sb1 kdbhntab @93 3
sb2 kdbhnrow @94 187
sb2 kdbhfrre @96 106
sb2 kdbhfsbo @98 400
sb2 kdbhfseo @100 401
sb2 kdbhavsp @102 1
sb2 kdbhtosp @104 1

BBED> sum apply
Check value for File 0, Block 3008:
current = 0x7d84, required = 0x7d84

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98c8825c
kdbchk: entries on the free list are not ordered
next=51 nrow=187 chas=106
Block 3008 failed with check code 6106
这里我们又可以看到触发了6106的错误,next=51这里其实就是指kdbr[106]这行记录的开始位置,这里我们将106指定107,代表106这行是已经被标识为删除了。
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 kdbr[107]
sb2 kdbr[107] @332 215

BBED> x /r kdbr[107]
kdbr[107] @332
———
flag@332: 0xd7 (KDRHFN, KDRHFP, KDRHFL, KDRHFD, KDRHFC, KDRHFK)
lock@333: 0x00
cols@334: 0



BBED> x /r kdbr[108]
kdbr[108] @334
———
flag@334: 0x7e (KDRHFP, KDRHFL, KDRHFF, KDRHFD, KDRHFH, KDRHFC)
lock@335: 0x00
cols@336: 0
ckix@337: 30

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98c8825c
kdbchk: entries on the free list are not ordered
next=51 nrow=187 chas=106
Block 3008 failed with check code 6106
DBVERIFY – Verification complete
这里又触发了6106的错误
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> set offset 330
OFFSET 330

BBED> modify /x 6b00
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 330 to 841 Dba:0x00000000
————————————————————————
6b00d700 7e000e1e b71d491d dc1c6f1c 151ca51b 4b1bdb1a 851a141a a7194c19


BBED> p kdbr[106]
sb2 kdbr[106] @330 107

BBED> sum apply
Check value for File 0, Block 3008:
current = 0x7ddc, required = 0x7ddc

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98c8825c
kdbchk: entries on the free list are not ordered
next=215 nrow=187 chas=107
Block 3008 failed with check code 6106

BBED> set offset 332
OFFSET 332

BBED> modify /x 6c00
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 332 to 843 Dba:0x00000000
————————————————————————
6c007e00 0e1eb71d 491ddc1c 6f1c151c a51b4b1b db1a851a 141aa719 4c19f518

BBED> sum apply
Check value for File 0, Block 3008:
current = 0x7d67, required = 0x7d67

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98c8825c
kdbchk: entries on the free list are not ordered
next=6016 nrow=187 chas=126
Block 3008 failed with check code 6106

BBED> p kdbr[107]
sb2 kdbr[107] @332 108

BBED> p kdbr[108]
sb2 kdbr[108] @334 126

BBED> set offset 334
OFFSET 334

BBED> modify /x ffff
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 334 to 845 Dba:0x00000000
————————————————————————
ffff0e1e b71d491d dc1c6f1c 151ca51b 4b1bdb1a 851a141a a7194c19 f5189f18
这里的FFFF代表的就是结束的意思
BBED> sum apply
Check value for File 0, Block 3008:
current = 0x82e6, required = 0x82e6

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008

Block Checking: DBA = 4197312, Block Type = KTB-managed data block
data header at 0x2a98cab25c
kdbchk: the amount of space used is not equal to block size
used=8044 fsc=0 avsp=1 dtl=8096
Block 3008 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
Message 531 not found; product=RDBMS; facility=BBED


BBED> p kdbh
struct kdbh, 14 bytes @92
ub1 kdbhflag @92 0x01 (KDBHFFK)
sb1 kdbhntab @93 3
sb2 kdbhnrow @94 187
sb2 kdbhfrre @96 106
sb2 kdbhfsbo @98 400
sb2 kdbhfseo @100 401
sb2 kdbhavsp @102 1
sb2 kdbhtosp @104 1

BBED> set offset 102
OFFSET 102

BBED> set offset 102
OFFSET 102

BBED> modify /x 3400
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 102 to 613 Dba:0x00000000
————————————————————————
34000d48 00001a00 1a005000 6a005100 891f1f1e 5a1ded1c 801cb61b ec1a251a
b8199317 2717ba16 4d168915 11144813 83126711 f910df0f be0e910c c70b3009


BBED> modify /x 3400
File: /tmp/system01.dbf (0)
Block: 3008 Offsets: 104 to 615 Dba:0x00000000
————————————————————————
34000000 1a001a00 50006a00 5100891f 1f1e5a1d ed1c801c b61bec1a 251ab819
93172717 ba164d16 89151114 48138312 6711f910 df0fbe0e 910cc70b 3009a106


BBED> sum apply
Check value for File 0, Block 3008:
current = 0x82e6, required = 0x82e6

BBED> verify
DBVERIFY – Verification starting
FILE = /tmp/system01.dbf
BLOCK = 3008


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
Message 531 not found; product=RDBMS; facility=BBED


本文固定链接: http://www.htz.pw/2014/06/26/%e5%b8%b8%e8%a7%81%e5%9d%8f%e5%9d%97%e5%88%86%e7%b1%bb%ef%bc%8cdbv%e6%8a%a5%e9%94%99%e4%bb%a3%e7%a0%81%ef%bc%9a6107.html | 认真就输

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【案例】Oracle数据库dbv检查坏块时报错代码:6107解决办法

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/1059.html

Oracle研究中心

关键词:

Block 3008 failed with check code 6107

常见坏块分类dbv报错代码:6107

关于verify验证块中报错:6107