ORA-00600 [kokasgi1]資料庫無法啟動的模擬與恢復
錯誤過程模擬復現
1.建立使用者及其對應表
1
2
3
4
5
6
7
8
9
10
11
12
13
14 |
SQL>
create
user
user1 identified
by
user
; User
created. SQL>
create
user
user2 identified
by
user
; User
created. SQL>
grant
dba
to
user1,user2; Grant
succeeded. SQL> conn user1/
user
; Connected. SQL>
create
table
test
as
select
*
from
dba_objects; Table
created. SQL> conn user2/
user
; Connected. SQL>
create
table
test
as
select
*
from
dba_objects; Table
created. |
2.模擬勒索病毒刪除user$表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 |
SQL>
delete
from
user
$; 88
rows
deleted. SQL>
commit
; Commit
complete. SQL> startup
force ORACLE instance started. Total System
Global
Area 1043886080 bytes Fixed
Size
2259840 bytes Variable
Size
654312576 bytes Database
Buffers 381681664 bytes Redo Buffers 5632000 bytes Database
mounted. ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00600: internal error code, arguments: [kokasgi1], [], [], [], [], [], [], [], [], [], [], [] Process ID: 5942 Session ID: 1 Serial number: 5 |
錯誤的解決與恢復
1.確定要修復的塊
1
2
3
4
5
6
7
8 |
SQL>
select
distinct
(dbms_rowid.rowid_block_number(rowid)) block_id
from
user
$;
BLOCK_ID ----------
209
213
211
210
212 |
資料庫使用者資訊被儲存到user$這個基表中,只涉及到 209 到 213 共 5 個塊
1
2
3
4 |
SQL>
select
distinct
(dbms_rowid.rowid_block_number(rowid)) block_id
from
bootstrap$
where
obj#
in
(
select
obj#
from
obj$
where
name
in
(
'I_USER1'
,
'I_USER2'
));
BLOCK_ID ----------
522 |
修復過程中要刪除user$的這2個索引,需要定位刪除的塊
1
2
3
4
5
6
7 |
SQL>
select
name
from
v$datafile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/test/system01.dbf /u01/app/oracle/oradata/test/sysaux01.dbf /u01/app/oracle/oradata/test/undotbs01.dbf /u01/app/oracle/oradata/test/users01.dbf |
2. 修復user$記錄對應的塊
- 修復前4個塊
/*
複製同平臺同版本資料庫對應位置的塊來覆蓋被刪除的前4個塊(前4個塊儲存的是系統使用者的資料))
*/
1
2
3
4 |
[oracle@ora11g_asm ~]$ dd if=/tmp/user_4_block skip=1 bs=8192
count
=4
of
=/u01/app/oracle/oradata/test/system01.dbf seek=209 conv=notrunc 記錄了4+0 的讀入 記錄了4+0 的寫出 32768位元組(33 kB)已複製,4.462e-05 秒,734 MB/秒 |
- 修復最後一個塊
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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420 |
[oracle@ora11g_asm bbed]$ bbed parfile=bbed.par BBED: Release 2.0.0.0.0 - Limited Production
on
Wed Apr 21 00:23:24 2021 Copyright (c) 1982, 2011, Oracle
and
/
or
its affiliates.
All
rights reserved. ************* !!!
For
Oracle Internal Use
only
!!! *************** BBED>
set
filename
'/u01/app/oracle/oradata/test/system01.dbf'
FILENAME /u01/app/oracle/oradata/test/system01.dbf BBED>
set
block 213
BLOCK# 213 BBED> p kdbt struct kdbt[0], 4 bytes @106
sb2 kdbtoffs @106 0
sb2 kdbtnrow @108 4 struct kdbt[1], 4 bytes @110
sb2 kdbtoffs @110 4
sb2 kdbtnrow @112 5 BBED> p *kdbr[5] rowdata[157] ------------ ub1 rowdata[157] @6800 0x5c BBED> x /rn rowdata[157] @6800 ------------ flag@6800: 0x5c (KDRHFL, KDRHFF, KDRHFD, KDRHFC) lock@6801: 0x02 cols@6802: 0 ckix@6803: 2 BBED>
modify
/x 4c Warning: contents
of
previous BIFILE will be lost. Proceed? (Y/N) y
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 6800
to
7311 Dba:0x00000000 ------------------------------------------------------------------------
4c021302 004000d1 00000a5f 4e455854 5f555345 520180ff 01800180 07787108
180c2629 ffffff01 80ff0180 ffff0180 01801644 45464155 4c545f43 4f4e5355
4d45525f 47524f55 50ff0180 ac000101 00000000 4000d500 02004000 d5000202
c1597c02 16030555 53455231 02c10210 31384139 34464137 30373031 45333632
02c10502 c1040778 79041418 2f0a0778 79041418 2f0affff 0180ff02 c102ffff
01800180 16444546 41554c54 5f434f4e 53554d45 525f4752 4f5550ff 0180ffff
3e533a33 46364332 38463139 46334438 42414339 46414532 30424230 34414645
35393832 42443238 30313434 37373846 41344138 37443343 41434533 4234455c
02130100 4000d100 000a5f4e 4558545f 55534552 0180ff01 80018007 78710818
0c2629ff ffff0180 ff0180ff ff018001 80164445 4641554c 545f434f 4e53554d
45525f47 524f5550 ff0180ac 00010100 00000040 00d50001 004000d5 000102c1
587c0216 02055553 45523202 c1021035 36463444 37433045 45443230 42464202
c10502c1 04077879 0414182e 34077879 0414182e 34ffff01 80ff02c1 02ffff01
80018016 44454641 554c545f 434f4e53 554d4552 5f47524f 5550ff01 80ffff3e
533a4231 30303030 30413142 36423642 36414439 41393146 36393331 30453944
45434635 45463446 31383841 42333132 46423039 42423346 38333938 38345c02
<32 bytes per line> BBED> p *kdbr[6] rowdata[1020] ------------- ub1 rowdata[1020] @7663 0x7c BBED>
modify
/x 6c
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 7663
to
8174 Dba:0x00000000 ------------------------------------------------------------------------
6c021600 0553434f 545402c1 02104638 39343834 34433334 34303242 363702c1
0502c104 07787108 180d0516 07787108 180d0516 07787904 14172a33 07787904
14172a33 0180ff02 c102ffff 02c10a01 80164445 4641554c 545f434f 4e53554d
45525f47 524f5550 ff0180ff ff3e533a 30373932 31323737 45423638 35463938
31364241 34373736 32333146 41333142 30433041 38344444 34444637 30453544
45433736 31413646 36423533 6c021600 0553434f 545402c1 02104638 39343834
34433334 34303242 363702c1 0502c104 07787108 180d0516 07787108 180d0516
ffff0180 ff02c102 ffff0180 01801644 45464155 4c545f43 4f4e5355 4d45525f
47524f55 50ff0180 ffff3e53 3a303739 32313237 37454236 38354639 38313642
41343737 36323331 46413331 42304330 41383444 44344446 37304535 44454337
36314136 46364235 335c0213 01004000 d100000a 5f4e4558 545f5553 45520180
ff018001 80077871 08180c26 29ffffff 0180ff01 80ffff01 80018016 44454641
554c545f 434f4e53 554d4552 5f47524f 5550ff01 80bc0101 00000000 004000d5
00010040 00d50001 02c1555c 02130000 4000d100 000a5f4e 4558545f 55534552
0180ff01 80018007 78710818 0c2629ff ffff0180 ff0180ff ff018001 80164445
4641554c 545f434f 4e53554d 45525f47 524f5550 ff0180ac 00010100 00000040
<32 bytes per line> BBED> p *kdbr[7] rowdata[255] ------------ ub1 rowdata[255] @6898 0x7c BBED>
modify
/x 6c
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 6898
to
7409 Dba:0x00000000 ------------------------------------------------------------------------
6c021603 05555345 523102c1 02103138 41393446 41373037 30314533 363202c1
0502c104 07787904 14182f0a 07787904 14182f0a ffff0180 ff02c102 ffff0180
01801644 45464155 4c545f43 4f4e5355 4d45525f 47524f55 50ff0180 ffff3e53
3a334636 43323846 31394633 44384241 43394641 45323042 42303441 46453539
38324244 32383031 34343737 38464134 41383744 33434143 45334234 455c0213
01004000 d100000a 5f4e4558 545f5553 45520180 ff018001 80077871 08180c26
29ffffff 0180ff01 80ffff01 80018016 44454641 554c545f 434f4e53 554d4552
5f47524f 5550ff01 80ac0001 01000000 004000d5 00010040 00d50001 02c1587c
02160205 55534552 3202c102 10353646 34443743 30454544 32304246 4202c105
02c10407 78790414 182e3407 78790414 182e34ff ff0180ff 02c102ff ff018001
80164445 4641554c 545f434f 4e53554d 45525f47 524f5550 ff0180ff ff3e533a
42313030 30303041 31423642 36423641 44394139 31463639 33313045 39444543
46354546 34463138 38414233 31324642 30394242 33463833 39383834 5c021303
004000d1 00000a5f 4e455854 5f555345 520180ff 01800180 07787108 180c2629
ffffff01 80ff0180 ffff0180 01801644 45464155 4c545f43 4f4e5355 4d45525f
47524f55 50ff0180 ac000101 00000000 4000d500 03004000 d5000302 c1577c02
<32 bytes per line> BBED> p *kdbr[8] rowdata[0] ---------- ub1 rowdata[0] @6643 0x7c BBED>
modify
/x 6c
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 6643
to
7154 Dba:0x00000000 ------------------------------------------------------------------------
6c021601 05555345 523202c1 02103536 46344437 43304545 44323042 464202c1
0502c104 07787904 14182f11 07787904 14182f11 ffff0180 ff02c102 ffff0180
01801644 45464155 4c545f43 4f4e5355 4d45525f 47524f55 50ff0180 ffff3e53
3a383737 41343736 46424131 30464531 35334434 33414146 34423438 36313641
34443333 35384245 32314241 39444630 34324546 43454142 45323043 444c0213
02004000 d100000a 5f4e4558 545f5553 45520180 ff018001 80077871 08180c26
29ffffff 0180ff01 80ffff01 80018016 44454641 554c545f 434f4e53 554d4552
5f47524f 5550ff01 80ac0001 01000000 004000d5 00020040 00d50002 02c1596c
02160305 55534552 3102c102 10313841 39344641 37303730 31453336 3202c105
02c10407 78790414 182f0a07 78790414 182f0aff ff0180ff 02c102ff ff018001
80164445 4641554c 545f434f 4e53554d 45525f47 524f5550 ff0180ff ff3e533a
33463643 32384631 39463344 38424143 39464145 32304242 30344146 45353938
32424432 38303134 34373738 46413441 38374433 43414345 33423445 5c021301
004000d1 00000a5f 4e455854 5f555345 520180ff 01800180 07787108 180c2629
ffffff01 80ff0180 ffff0180 01801644 45464155 4c545f43 4f4e5355 4d45525f
47524f55 50ff0180 ac000101 00000000 4000d500 01004000 d5000102 c1587c02
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7de9, required = 0x7de9 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7fbdcb83f25c kdbchk:
key
comref
count
wrong
keyslot=0 Block 213 failed
with
check
code 6121 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[0] rowdata[1523] ------------- ub1 rowdata[1523] @8166 0xac BBED> x /rn rowdata[1523] @8166 ------------- flag@8166: 0xac (KDRHFL, KDRHFF, KDRHFH, KDRHFK) lock@8167: 0x00 cols@8168: 1 kref@8169: 1 hrid@8171:0x004000d5.0 nrid@8177:0x004000d5.0 col 0[2] @8185: 83 BBED>
modify
/x 01 offset 8171
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 8171
to
8191 Dba:0x00000000 ------------------------------------------------------------------------
01000040 00d50000 004000d5 000002c1 540406b8 c6
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7ce9, required = 0x7ce9 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7ddc5c kdbchk:
key
comref
count
wrong
keyslot=1 Block 213 failed
with
check
code 6121 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[1] rowdata[488] ------------ ub1 rowdata[488] @7131 0xac BBED> x /rn rowdata[488] @7131 ------------ flag@7131: 0xac (KDRHFL, KDRHFF, KDRHFH, KDRHFK) lock@7132: 0x00 cols@7133: 1 kref@7134: 1 hrid@7136:0x004000d5.1 nrid@7142:0x004000d5.1 col 0[2] @7150: 87 BBED>
modify
/x 01 offset 7136
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 7136
to
7647 Dba:0x00000000 ------------------------------------------------------------------------
01000040 00d50001 004000d5 000102c1 587c0216 02055553 45523202 c1021035
36463444 37433045 45443230 42464202 c10502c1 04077879 0414182e 34077879
0414182e 34ffff01 80ff02c1 02ffff01 80018016 44454641 554c545f 434f4e53
554d4552 5f47524f 5550ff01 80ffff3e 533a4231 30303030 30413142 36423642
36414439 41393146 36393331 30453944 45434635 45463446 31383841 42333132
46423039 42423346 38333938 38345c02 13030040 00d10000 0a5f4e45 58545f55
53455201 80ff0180 01800778 7108180c 2629ffff ff0180ff 0180ffff 01800180
16444546 41554c54 5f434f4e 53554d45 525f4752 4f5550ff 0180ac00 01010000
00004000 d5000300 4000d500 0302c157 7c021601 05555345 523102c1 02103138
41393446 41373037 30314533 363202c1 0502c104 07787904 14182e33 07787904
14182e33 ffff0180 ff02c102 ffff0180 01801644 45464155 4c545f43 4f4e5355
4d45525f 47524f55 50ff0180 ffff3e53 3a313941 44463331 41424141 37384632
36433133 42343138 32394630 41333531 45363442 33393731 45353330 37394338
42303434 30334133 39344131 305c0213 02004000 d100000a 5f4e4558 545f5553
45520180 ff018001 80077871 08180c26 29ffffff 0180ff01 80ffff01 80018016
44454641 554c545f 434f4e53 554d4552 5f47524f 5550ff01 80bc0101 00000000
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7ce8, required = 0x7ce8 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7ddc5c kdbchk:
key
comref
count
wrong
keyslot=2 Block 213 failed
with
check
code 6121 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[2] rowdata[233] ------------ ub1 rowdata[233] @6876 0xac BBED> x /rn rowdata[233] @6876 ------------ flag@6876: 0xac (KDRHFL, KDRHFF, KDRHFH, KDRHFK) lock@6877: 0x00 cols@6878: 1 kref@6879: 1 hrid@6881:0x004000d5.2 nrid@6887:0x004000d5.2 col 0[2] @6895: 88 BBED>
modify
/x 01 offset 6881
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 6881
to
7392 Dba:0x00000000 ------------------------------------------------------------------------
01000040 00d50002 004000d5 000202c1 596c0216 03055553 45523102 c1021031
38413934 46413730 37303145 33363202 c10502c1 04077879 0414182f 0a077879
0414182f 0affff01 80ff02c1 02ffff01 80018016 44454641 554c545f 434f4e53
554d4552 5f47524f 5550ff01 80ffff3e 533a3346 36433238 46313946 33443842
41433946 41453230 42423034 41464535 39383242 44323830 31343437 37384641
34413837 44334341 43453342 34455c02 13010040 00d10000 0a5f4e45 58545f55
53455201 80ff0180 01800778 7108180c 2629ffff ff0180ff 0180ffff 01800180
16444546 41554c54 5f434f4e 53554d45 525f4752 4f5550ff 0180ac00 01010001
00004000 d5000100 4000d500 0102c158 7c021602 05555345 523202c1 02103536
46344437 43304545 44323042 464202c1 0502c104 07787904 14182e34 07787904
14182e34 ffff0180 ff02c102 ffff0180 01801644 45464155 4c545f43 4f4e5355
4d45525f 47524f55 50ff0180 ffff3e53 3a423130 30303030 41314236 42364236
41443941 39314636 39333130 45394445 43463545 46344631 38384142 33313246
42303942 42334638 33393838 345c0213 03004000 d100000a 5f4e4558 545f5553
45520180 ff018001 80077871 08180c26 29ffffff 0180ff01 80ffff01 80018016
44454641 554c545f 434f4e53 554d4552 5f47524f 5550ff01 80ac0001 01000000
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7de8, required = 0x7de8 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7ddc5c kdbchk:
key
comref
count
wrong
keyslot=3 Block 213 failed
with
check
code 6121 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[3] rowdata[743] ------------ ub1 rowdata[743] @7386 0xac BBED> x /rn rowdata[743] @7386 ------------ flag@7386: 0xac (KDRHFL, KDRHFF, KDRHFH, KDRHFK) lock@7387: 0x00 cols@7388: 1 kref@7389: 1 hrid@7391:0x004000d5.3 nrid@7397:0x004000d5.3 col 0[2] @7405: 86 BBED>
modify
/x 01 offset 7391
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 7391
to
7902 Dba:0x00000000 ------------------------------------------------------------------------
01000040 00d50003 004000d5 000302c1 577c0216 01055553 45523102 c1021031
38413934 46413730 37303145 33363202 c10502c1 04077879 0414182e 33077879
0414182e 33ffff01 80ff02c1 02ffff01 80018016 44454641 554c545f 434f4e53
554d4552 5f47524f 5550ff01 80ffff3e 533a3139 41444633 31414241 41373846
32364331 33423431 38323946 30413335 31453634 42333937 31453533 30373943
38423034 34303341 33393441 31305c02 13020040 00d10000 0a5f4e45 58545f55
53455201 80ff0180 01800778 7108180c 2629ffff ff0180ff 0180ffff 01800180
16444546 41554c54 5f434f4e 53554d45 525f4752 4f5550ff 0180bc01 01000000
00004000 d5000200 4000d500 0202c156 6c021600 0553434f 545402c1 02104638
39343834 34433334 34303242 363702c1 0502c104 07787108 180d0516 07787108
180d0516 07787904 14172a33 07787904 14172a33 0180ff02 c102ffff 02c10a01
80164445 4641554c 545f434f 4e53554d 45525f47 524f5550 ff0180ff ff3e533a
30373932 31323737 45423638 35463938 31364241 34373736 32333146 41333142
30433041 38344444 34444637 30453544 45433736 31413646 36423533 6c021600
0553434f 545402c1 02104638 39343834 34433334 34303242 363702c1 0502c104
07787108 180d0516 07787108 180d0516 ffff0180 ff02c102 ffff0180 01801644
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7ce8, required = 0x7ce8 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7ddc5c kdbchk: the amount
of
space
used
is
not
equal
to
block
size
used=690 fsc=546 avsp=7406 dtl=8096 Block 213 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>
modify
/x 0000 offset 86
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 213 Offsets: 86
to
597 Dba:0x00000000 ------------------------------------------------------------------------
00000000 00000102 09000400 28009719 ee1c201f 00000400 04000500 8a1f7f1b
801a7e1c ffff341a 931d961a 9719f80e 9c0e480e 040ea40d 400de40c 900c4c0c
f00b8c0b 300bdc0a 980a380a d0096409 1009cc08 6c080808 ac075807 1407b406
5006f405 a0055c05 fc049404 3804e403 a0034003 dc028002 2c02e801 88012401
c8006a17 3d170a00 18001000 14001200 41166f4a 01006f4a 01000100 00000000
00000a16 0d590000 7e02020d 16972a00 0000b276 c0006100 55000302 0100f2bd
80005cbe 80000000 00000000 00000453 35313405 656e2d75 73060080 c3230067
80000a00 18001000 14001c00 06006e4a 01006e4a 01000100 00000000 00000a16
0d580000 7e02020d 16972a00 0000b276 c0006100 54000302 0100eabd 800052c4
80000000 00000000 00000753 616d706c 65720650 55424c49 4305656e 2d757306
0080c323 00670a00 18001000 14001700 13076d4a 01006d4a 01000100 00000000
00000a16 0d570000 7e02020d 16972a00 0000b276 c0006100 53000302 0100e2bd
800090c1 80000000 00000000 00000773 616d706c 65720650 55424c49 4305656e
2d757301 804c0800 18001000 14006c4a 01006c4a 01000100 00000000 00000b01
0d560000 7e02020d 0000296a 0d00b276 c0006100 520023c3 8000dabd 8000fa12
03010200 00006700 00bf0a00 18001000 14000900 8000dd4c 0100dd4c 01000100
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7eca, required = 0x7eca BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 Block Checking: DBA = 4194517, Block Type = KTB-managed data block data header
at
0x7ddc5c kdbchk:
space
available
on
commit
is
incorrect
tosp=7968 fsc=0 stb=0 avsp=7406 Block 213 failed
with
check
code 6111 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> assign kdbhtosp=kdbhavsp sb2 kdbhtosp @104 7406 BBED>
sum
apply Check
value
for
File 0, Block 213: current
= 0x7d04, required = 0x7d04 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 213 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 |
3. 刪除I_USER1和I_USER2兩個索引
由於表資料已經修改,此時索引和表資料不一致,需要手動刪除索引
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 |
BBED>
set
block 522
BLOCK# 522 BBED> p kdbr sb2 kdbr[0] @86 7506 sb2 kdbr[1] @88 7297 sb2 kdbr[2] @90 7095 sb2 kdbr[3] @92 6883 sb2 kdbr[4] @94 6282 sb2 kdbr[5] @96 5895 sb2 kdbr[6] @98 5666 sb2 kdbr[7] @100 4814 sb2 kdbr[8] @102 4611 sb2 kdbr[9] @104 4345 sb2 kdbr[10] @106 4128 sb2 kdbr[11] @108 3905 sb2 kdbr[12] @110 3701 sb2 kdbr[13] @112 3417 sb2 kdbr[14] @114 3245 sb2 kdbr[15] @116 2944 sb2 kdbr[16] @118 2739 sb2 kdbr[17] @120 2524 sb2 kdbr[18] @122 1893 sb2 kdbr[19] @124 1686 sb2 kdbr[20] @126 1458 BBED> p *kdbr[20] rowdata[0] ---------- ub1 rowdata[0] @1526 0x2c BBED> x /rnnc rowdata[0] @1526 ---------- flag@1526: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@1527: 0x01 cols@1528: 3 col 0[2] @1529: 47 col 1[2] @1532: 47 col 2[218] @1535:
CREATE
UNIQUE
INDEX
I_USER2
ON
USER
$(
USER
#,TYPE#,SPARE1 ,SPARE2) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 64K
NEXT
102 4K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 47 EXTENTS (FILE 1 BLOCK 424)) BBED> p *kdbr[19] rowdata[228] ------------ ub1 rowdata[228] @1754 0x2c BBED> x /rnnc rowdata[228] @1754 ------------ flag@1754: 0x2c (KDRHFL, KDRHFF, KDRHFH) lock@1755: 0x01 cols@1756: 3 col 0[2] @1757: 46 col 1[2] @1760: 46 col 2[197] @1763:
CREATE
UNIQUE
INDEX
I_USER1
ON
USER
$(
NAME
) PCTFREE 10 I NITRANS 2 MAXTRANS 255 STORAGE ( INITIAL 64K
NEXT
1024K MINEXTENTS 1 MAXEX TENTS 2147483645 PCTINCREASE 0 OBJNO 46 EXTENTS (FILE 1 BLOCK 416)) BBED>
modify
/x 3c
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 522 Offsets: 1754
to
2265 Dba:0x00000000 ------------------------------------------------------------------------
3c010302 c12f02c1 2fc54352 45415445 20554e49 51554520 494e4445 5820495f
55534552 31204f4e 20555345 5224284e 414d4529 20504354 46524545 20313020
494e4954 52414e53 2032204d 41585452 414e5320 32353520 53544f52 41474520
28202049 4e495449 414c2036 344b204e 45585420 31303234 4b204d49 4e455854
454e5453 2031204d 41584558 54454e54 53203231 34373438 33363435 20504354
494e4352 45415345 2030204f 424a4e4f 20343620 45585445 4e545320 2846494c
45203120 424c4f43 4b203431 3629292c 010302c1 1702c117 fe6b0243 52454154
45205441 424c4520 55534552 24282255 53455223 22204e55 4d424552 204e4f54
204e554c 4c2c224e 414d4522 20564152 43484152 32283330 29204e4f 54204e55
4c4c2c22 54595045 2322204e 554d4245 52204e4f 54204e55 4c4c2c22 50415353
574f5244 22205641 52434841 52322833 30292c22 44415441 54532322 204e554d
42455220 4e4f5420 4e554c4c 2c225445 4d505453 2322204e 554d4245 52204e4f
54204e55 4c4c2c22 4354494d 45222044 41544520 4e4f5420 4e554c4c 2c225054
494d4522 20444154 452c2245 58505449 4d452220 44415445 2c224c54 494d4522
20444154 452c2252 45534f55 52434524 22204e55 4d424552 204e4f54 204e554c
4c2c2241 55444954 24222056 41524348 41523228 3338292c 22444546 524f4c45
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 522: current
= 0x1ee8, required = 0x1ee8 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 522 Block Checking: DBA = 4194826, Block Type = KTB-managed data block data header
at
0x842e44 kdbchk: the amount
of
space
used
is
not
equal
to
block
size
used=6291 fsc=0 avsp=1398 dtl=8120 Block 522 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 @68
ub1 kdbhflag @68 0x00 (NONE)
sb1 kdbhntab @69 1
sb2 kdbhnrow @70 21
sb2 kdbhfrre @72 -1
sb2 kdbhfsbo @74 60
sb2 kdbhfseo @76 1458
sb2 kdbhavsp @78 1398
sb2 kdbhtosp @80 1398 BBED>
modify
/x 2507 offset 78
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 522 Offsets: 78
to
589 Dba:0x00000000 ------------------------------------------------------------------------
25077605 00001500 521d811c b71be31a 8a180717 2216ce12 0312f910 2010410f
750e590d ad0c800b b30adc09 65079606 b2050000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 522: current
= 0x1cbb, required = 0x1cbb BBED> ASSIGN kdbhtosp=kdbhavsp sb2 kdbhtosp @80 1829 BBED>
sum
apply Check
value
for
File 0, Block 522: current
= 0x1ee8, required = 0x1ee8 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 522 Block Checking: DBA = 4194826, Block Type = KTB-managed data block data header
at
0x864e44 kdbchk:
space
available
on
commit
is
incorrect
tosp=1829 fsc=0 stb=4 avsp=1829 Block 522 failed
with
check
code 6111 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 @68
ub1 kdbhflag @68 0x00 (NONE)
sb1 kdbhntab @69 1
sb2 kdbhnrow @70 21
sb2 kdbhfrre @72 -1
sb2 kdbhfsbo @74 60
sb2 kdbhfseo @76 1458
sb2 kdbhavsp @78 1829
sb2 kdbhtosp @80 1829 BBED>
modify
/x 2907 offset 80
File: /u01/app/oracle/oradata/test/system01.dbf (0)
Block: 522 Offsets: 80
to
591 Dba:0x00000000 ------------------------------------------------------------------------
29070000 1500521d 811cb71b e31a8a18 07172216 ce120312 f9102010 410f750e
590dad0c 800bb30a dc096507 9606b205 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line> BBED>
sum
apply Check
value
for
File 0, Block 522: current
= 0x1ee4, required = 0x1ee4 BBED> verify DBVERIFY - Verification starting FILE = /u01/app/oracle/oradata/test/system01.dbf BLOCK = 522 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 |
4. 啟動資料庫檢查資料
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 |
SQL> conn /
as
sysdba Connected
to
an idle instance. SQL> startup ORACLE instance started. Total System
Global
Area 1043886080 bytes Fixed
Size
2259840 bytes Variable
Size
654312576 bytes Database
Buffers 381681664 bytes Redo Buffers 5632000 bytes Database
mounted. Database
opened. SQL> conn user1/
user
; Connected. SQL>
select
count
(*)
from
test;
COUNT
(*) ----------
86259 SQL> conn user2/
user
; Connected. SQL>
select
count
(*)
from
test;
COUNT
(*) ----------
86260 |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15810651/viewspace-2916998/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【資料庫資料恢復】無法啟動MongoDB服務的資料恢復案例資料庫資料恢復MongoDB
- 資料庫資料恢復——Windows無法啟動MongoDB服務的資料恢復案例資料庫資料恢復WindowsMongoDB
- 【資料庫資料恢復】突然斷電造成Syabse資料庫無法啟動的資料恢復案例資料庫資料恢復
- PostgreSQL 恢復大法 - 恢復部分資料庫、跳過壞塊、修復無法啟動的資料庫SQL資料庫
- 【儲存資料恢復案例】儲存斷電後無法成功重啟,虛擬機器無法啟動-資料恢復資料恢復虛擬機
- [20190531]ORA-600 kokasgi1故障模擬與恢復.txt
- 資料庫資料恢復-oracle資料庫報錯無法開啟的如何恢復資料?資料庫資料恢復Oracle
- 【虛擬機器資料恢復】異常斷電導致虛擬機器無法啟動的資料恢復案例虛擬機資料恢復
- 【資料庫資料恢復】SqlServer資料庫無法讀取的資料恢復案例資料庫資料恢復SQLServer
- [20190531]ORA-600 kokasgi1故障模擬與恢復(後續).txt
- 【伺服器資料恢復】同友儲存無法啟動的資料恢復案例伺服器資料恢復
- 資料庫資料恢復—無備份,binlog未開啟的Mysql資料庫資料恢復案例資料庫資料恢復MySql
- 【北亞資料恢復】異常斷電導致linux伺服器無法啟動,資料庫損壞的資料恢復資料恢復Linux伺服器資料庫
- 【資料庫資料恢復】Oracle ASM例項無法掛載的資料恢復案例資料庫資料恢復OracleASM
- 【資料庫資料恢復】MongoDB資料庫服務啟動失敗的資料恢復案例資料庫資料恢復MongoDB
- 電腦無法開機系統無法啟動,如何進行資料恢復?資料恢復
- 資料庫資料恢復—MongoDB資料庫檔案丟失,啟動報錯的資料恢復案例資料庫資料恢復MongoDB
- 【伺服器資料恢復】RAID故障導致資料庫分割槽無法識別的資料恢復伺服器資料恢復AI資料庫
- 【伺服器資料恢復】VSAN故障導致虛擬機器無法訪問的資料恢復案例伺服器資料恢復虛擬機
- MYSQL資料庫服務無法啟動MySql資料庫
- 伺服器資料恢復-RAID資訊丟失導致伺服器作業系統無法啟動的資料恢復案例伺服器資料恢復AI作業系統
- 【北亞伺服器資料恢復】raid5崩潰導致同友儲存無法啟動的資料恢復案例伺服器資料恢復AI
- 備份與恢復:polardb資料庫備份與恢復資料庫
- 【伺服器資料恢復】infortrend儲存資料無法訪問的資料恢復案例伺服器資料恢復
- 【伺服器資料恢復】RAID5無法識別的資料恢復案例伺服器資料恢復AI
- 【資料庫資料恢復】SAP資料庫資料恢復案例資料庫資料恢復
- 【資料庫資料恢復】透過恢復NDF檔案修復資料庫的資料恢復過程資料庫資料恢復
- 寶塔資料庫恢復 mysql資料庫丟失恢復 mysql資料庫刪除庫恢復 寶塔mysql資料庫恢復資料庫MySql
- 資料庫啟動遭遇ORA-00600: [keltnfy-ldmInit]資料庫
- 【資料庫資料恢復】如何恢復Oracle資料庫truncate表的資料資料庫資料恢復Oracle
- 【資料庫資料恢復】windows server下SqlServer資料庫的資料恢復資料庫資料恢復WindowsServerSQL
- sql server資料庫錯誤資料恢復(資料庫連線失效,無法附加查詢)SQLServer資料庫資料恢復
- 伺服器資料恢復-VSAN節點掉線導致虛擬機器無法訪問的資料恢復方案伺服器資料恢復虛擬機
- 【北亞資料恢復】非物理故障導致的伺服器藍屏且無法重啟的資料恢復案例資料恢復伺服器
- 【資料庫資料恢復】Sql Server資料庫資料恢復案例資料庫資料恢復SQLServer
- redo損壞修復啟動資料庫辦法資料庫
- 3.1.5.7 啟動例項、掛載資料庫並啟動完整的媒體恢復資料庫
- 【資料庫資料恢復】誤truncate table的Oracle資料庫資料恢復方案資料庫資料恢復Oracle