码迷,mamicode.com
首页 > 其他好文 > 详细

使用BBED恢复DELETE的数据

时间:2015-01-30 16:00:13      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:bbed   恢复delete数据   


测试环境请参见

使用BBED手工提交事务


尝试恢复delete的数据:

BBED> modify /x 2c offset 5064

 File: /data/orcl/orcl/users01.dbf (4)

 Block: 68               Offsets: 5064 to 5071           Dba:0x01000044

------------------------------------------------------------------------

 2c000d03 53595305

 

 <32 bytes per line>

 

BBED> sum apply

Check value for File 4, Block 68:

current = 0xf95f, required = 0xf95f

 

BBED> verify

DBVERIFY - Verification starting

FILE = /data/orcl/orcl/users01.dbf

BLOCK = 68

 

Block Checking: DBA = 16777284, Block Type= KTB-managed data block

data header at 0x1070fa7c

kdbchk: the amount of space used is notequal to block size

       used=7190 fsc=0 avsp=946 dtl=8064

Block 68 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

 

8064-7190=874 -->036A  -->6a03

 

 

BBED> p kdbhavsp

b2 kdbhavsp                                 @134      946

 

BBED> modify /x 6a03 offset 134

 File: /data/orcl/orcl/users01.dbf (4)

 Block: 68               Offsets:  134 to 141           Dba:0x01000044

------------------------------------------------------------------------

 6a03b403 00005b00

 

 <32 bytes per line>

 

BBED> sum apply

Check value for File 4, Block 68:

current = 0xf987, required = 0xf987

 

BBED> verify

DBVERIFY - Verification starting

FILE = /data/orcl/orcl/users01.dbf

BLOCK = 68

 

Block Checking: DBA = 16777284, Block Type= KTB-managed data block

data header at 0x1070fa7c

kdbchk: space available on commit isincorrect

       tosp=948 fsc=0 stb=0 avsp=874                     --kdbchk: space availableon commit is incorrect

Block 68 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

 

 

把tosp和avsp修改为一致就可以了

BBED> modify /x 6a036a03

 File: /data/orcl/orcl/users01.dbf (4)

 Block: 68               Offsets:  134 to 141           Dba:0x01000044

------------------------------------------------------------------------

 6a036a03 00005b00

 

 <32 bytes per line>

 

BBED> sum apply

Check value for File 4, Block 68:

current = 0xf959, required = 0xf959

 

BBED> verify

DBVERIFY - Verification starting

FILE = /data/orcl/orcl/users01.dbf

BLOCK = 68

 

 

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

 

查询数据,看删除的数据找回来了。

 

BBED> p *kdbr[40]

rowdata[3866]

-------------

ub1 rowdata[3866]                           @5064     0x2c

 

BBED> x /rnccccccccccccccc

rowdata[3866]                               @5064   

-------------

flag@5064: 0x2c (KDRHFL, KDRHFF, KDRHFH)

lock@5065: 0x00

cols@5066:  13

 

col   0[3] @5067: -0

col   1[5] @5071: USER$

col   2[0] @5077: *NULL*

col   3[2] @5078: ..

col   4[2] @5081: ..

col   5[5] @5084: TABLE

col   6[7] @5090: xl...(1

col   7[7] @5098: xl....,

col  8[19] @5106: 2008-03-12:00:39:48

col   9[5] @5126: VALID

col  10[1] @5132: N

col  11[1] @5134: N

col  12[1] @5136: N

 

 

SQL> alter system flush buffer_cache;

 

System altered.

 

SQL> select count(*) from tt_trans;

 

 COUNT(*)

----------

      399


使用BBED恢复DELETE的数据

标签:bbed   恢复delete数据   

原文地址:http://blog.csdn.net/card_2005/article/details/43306189

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!