二十三、用bbed 模拟了一个lbbw说的类似的问题
[oracle@Moracle ~]$ more a.txt
1 /oradata/open/system01.dbf 503316480
2 /oradata/open/undotbs01.dbf 26214400
3 /oradata/open/sysaux01.dbf 251658240
4 /oradata/open/users01.dbf 5242880
6 /oradata/open/user_tb01.dbf 104857600
~
~

[oracle@Moracle ~]$
[oracle@Moracle ~]$
[oracle@Moracle ~]$
[oracle@Moracle ~]$ bbed password =blockedit parfile=par.bbd

BBED: Release 2.0.0.0.0 – Limited Production on Sun Jul 4 09:44:50 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

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

BBED> set file 6
FILE# 6

BBED> set block 1
BLOCK# 1

BBED> dump
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 0 to 511 Dba:0×01800001
————————————————————————
0ba20000 01008001 00000000 00000104 603e0000 00000000 0001200a 67783143
4f50454e 4c414200 3d050000 00320000 00200000 06000300 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 688d0b00 00000000 4eab1b2b d3ba082b b8dd0800 00000000 00000000
00000000 00000000 00000400 0e000000 4b271f2b 0d000000 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 07000000 08005553 45525f54 42310000 00000000
00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
acb9082b d2dc0800 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 44330d00 0000ffbf 4b271f2b 0100bc0c 12000000 02000000 10000000

<32 bytes per line>

BBED>
BBED> modify /x 33 file 6 block 1 offset 45
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 45 to 556 Dba:0×01800001
————————————————————————
33000000 20000006 00030000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000068 8d0b0000 0000004e
ab1b2bd3 ba082bb8 dd080000 00000000 00000000 00000000 00000000 0004000e
0000004b 271f2b0d 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 00000007
00000008 00555345 525f5442 31000000 00000000 00000000 00000000 00000000
00000006 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 000000ac b9082bd2 dc080000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000044 330d0000 00ffbf4b
271f2b01 00bc0c12 00000002 00000010 00000002 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> set offet 0
BBED-00202: invalid parameter (offet)

BBED> set offset 0
OFFSET 0

BBED> dump
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 0 to 511 Dba:0×01800001
————————————————————————
0ba20000 01008001 00000000 00000104 603e0000 00000000 0001200a 67783143
4f50454e 4c414200 3d050000 00330000 00200000 06000300 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 688d0b00 00000000 4eab1b2b d3ba082b b8dd0800 00000000 00000000
00000000 00000000 00000400 0e000000 4b271f2b 0d000000 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 07000000 08005553 45525f54 42310000 00000000
00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
acb9082b d2dc0800 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 44330d00 0000ffbf 4b271f2b 0100bc0c 12000000 02000000 10000000

<32 bytes per line>

BBED> help all
SET DBA [ dba | file#, block# ]
SET FILENAME ‘filename’
SET FILE file#
SET BLOCK [+/-]block#
SET OFFSET [ [+/-]byte offset | symbol | *symbol ]
SET BLOCKSIZE bytes
SET LIST[FILE] ‘filename’
SET WIDTH character_count
SET COUNT bytes_to_display
SET IBASE [ HEX | OCT | DEC ]
SET OBASE [ HEX | OCT | DEC ]
SET MODE [ BROWSE | EDIT ]
SET SPOOL [ Y | N ]
SHOW [ | ALL ]
INFO
MAP[/v] [ DBA | FILENAME | FILE | BLOCK ]
DUMP[/v] [ DBA | FILENAME | FILE | BLOCK | OFFSET | COUNT ]
PRINT[/x|d|u|o|c] [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ]
EXAMINE[/Nuf] [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ]
:
N – a number which specifies a repeat count.
u – a letter which specifies a unit size:
b – b1, ub1 (byte)
h – b2, ub2 (half-word)
w – b4, ub4(word)
r – Oracle table/index row
f – a letter which specifies a display format:
x – hexadecimal
d – decimal
u – unsigned decimal
o – octal
c – character (native)
n – Oracle number
t – Oracle date
i – Oracle rowid
FIND[/x|d|u|o|c] numeric/character string [ TOP | CURR ]
COPY [ DBA | FILE | FILENAME | BLOCK ] TO [ DBA | FILE | FILENAME | BLOCK ]
MODIFY[/x|d|u|o|c] numeric/character string
[ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ]
ASSIGN[/x|d|u|o] =
: [ DBA | FILE | FILENAME | BLOCK | OFFSET | symbol | *symbol ]
: [ value | ]
SUM [ DBA | FILE | FILENAME | BLOCK ] [ APPLY ]
PUSH [ DBA | FILE | FILENAME | BLOCK | OFFSET ]
POP [ALL]
REVERT [ DBA | FILE | FILENAME | BLOCK ]
UNDO
HELP [ | ALL ]
VERIFY [ DBA | FILE | FILENAME | BLOCK ]
CORRUPT [ DBA | FILE | FILENAME | BLOCK ]

BBED> verify dba 6 block 1
BBED-00205: illegal or out of range DBA (File 0, Block 6)

BBED> verify dba 6,1
DBVERIFY – Verification starting
FILE = /oradata/open/user_tb01.dbf
BLOCK = 1

Block 1 is corrupt
Corrupt block relative dba: 0×01800001 (file 0, block 1)
Bad check value found during verification
Data in bad block:
type: 11 format: 2 rdba: 0×01800001
last change scn: 0×0000.00000000 seq: 0×1 flg: 0×04
spare1: 0×0 spare2: 0×0 spare3: 0×0
consistency value in tail: 0x00000b01
check value in block header: 0x3e60
computed block checksum: 0×100

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 : 0
Total Blocks Marked Corrupt : 1
Total Blocks Influx : 0

BBED> help dum
BBED-00202: invalid parameter (dum)

BBED> help sum
SUM [ DBA | FILE | FILENAME | BLOCK ] [ APPLY ]

BBED> sum file 6 block 1
Check value for File 6, Block 1:
current = 0x3e60, required = 0x3f60

BBED> dump
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 0 to 511 Dba:0×01800001
————————————————————————
0ba20000 01008001 00000000 00000104 603e0000 00000000 0001200a 67783143
4f50454e 4c414200 3d050000 00330000 00200000 06000300 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 688d0b00 00000000 4eab1b2b d3ba082b b8dd0800 00000000 00000000
00000000 00000000 00000400 0e000000 4b271f2b 0d000000 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 07000000 08005553 45525f54 42310000 00000000
00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
acb9082b d2dc0800 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 44330d00 0000ffbf 4b271f2b 0100bc0c 12000000 02000000 10000000

<32 bytes per line>

BBED> modify /x 3f file 6 block 1 offset 16
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 16 to 527 Dba:0×01800001
————————————————————————
3f3e0000 00000000 0001200a 67783143 4f50454e 4c414200 3d050000 00330000
00200000 06000300 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 688d0b00 00000000 4eab1b2b
d3ba082b b8dd0800 00000000 00000000 00000000 00000000 00000400 0e000000
4b271f2b 0d000000 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 07000000
08005553 45525f54 42310000 00000000 00000000 00000000 00000000 00000000
06000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 acb9082b d2dc0800 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 44330d00 0000ffbf 4b271f2b
0100bc0c 12000000 02000000 10000000 02000000 00000000 00000000 00000000

<32 bytes per line>

BBED> undo
BBED> modify /x 60 filename ‘/oradata/open/user_tb01.dbf’ block 1. offset 16.
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 16 to 527 Dba:0×01800001
————————————————————————
603e0000 00000000 0001200a 67783143 4f50454e 4c414200 3d050000 00330000
00200000 06000300 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 688d0b00 00000000 4eab1b2b
d3ba082b b8dd0800 00000000 00000000 00000000 00000000 00000400 0e000000
4b271f2b 0d000000 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 07000000
08005553 45525f54 42310000 00000000 00000000 00000000 00000000 00000000
06000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 acb9082b d2dc0800 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 44330d00 0000ffbf 4b271f2b
0100bc0c 12000000 02000000 10000000 02000000 00000000 00000000 00000000

<32 bytes per line>

BBED> modify /x 3f file 6 block 1 offset 17
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 17 to 528 Dba:0×01800001
————————————————————————
3f000000 00000000 01200a67 7831434f 50454e4c 4142003d 05000000 33000000
20000006 00030000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000068 8d0b0000 0000004e ab1b2bd3
ba082bb8 dd080000 00000000 00000000 00000000 00000000 0004000e 0000004b
271f2b0d 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 00000007 00000008
00555345 525f5442 31000000 00000000 00000000 00000000 00000000 00000006
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 000000ac b9082bd2 dc080000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000044 330d0000 00ffbf4b 271f2b01
00bc0c12 00000002 00000010 00000002 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> set offset 0
OFFSET 0

BBED> dump
File: /oradata/open/user_tb01.dbf (6)
Block: 1 Offsets: 0 to 511 Dba:0×01800001
————————————————————————
0ba20000 01008001 00000000 00000104 603f0000 00000000 0001200a 67783143
4f50454e 4c414200 3d050000 00330000 00200000 06000300 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 688d0b00 00000000 4eab1b2b d3ba082b b8dd0800 00000000 00000000
00000000 00000000 00000400 0e000000 4b271f2b 0d000000 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 07000000 08005553 45525f54 42310000 00000000
00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
acb9082b d2dc0800 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 44330d00 0000ffbf 4b271f2b 0100bc0c 12000000 02000000 10000000

<32 bytes per line>

BBED> sum file 6 block 1 apply
Check value for File 6, Block 1:
current = 0x3f60, required = 0x3f60

[/code]

重新强制启动数据库
1. SQL> startup force
2. ORACLE instance started.
3.
4. Total System Global Area 281018368 bytes
5. Fixed Size 1218968 bytes
6. Variable Size 83887720 bytes
7. Database Buffers 192937984 bytes
8. Redo Buffers 2973696 bytes
9. Database mounted.
10. ORA-01122: database file 6 failed verification check
11. ORA-01110: data file 6: '/oradata/open/user_tb01.dbf'
12. ORA-01200: actual file size of 12800 is smaller than correct size of 13056
13. blocks
复制代码

在上面的例子里面 0x3200,0x3300 对应的大小为:
1. SQL> select to_number('3200','XXXXXXXX') from dual;
2.
3. TO_NUMBER('3200','XXXXXXXX')
4. ----------------------------
5. 12800
6.
7. SQL> select to_number('3300','XXXXXXXX') from dual;
8.
9. TO_NUMBER('3300','XXXXXXXX')
10. ----------------------------
11. 13056
复制代码

以上就是修改了后的结果,如果逆向操作的话,就可以吧database给改回去,我就不演示了,希望对大家有点作用,不对的地方请指正! 别拍我就行!

Trackback

no comment untill now

Add your comment now

切换到手机版