Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to retrieve deleted data through BBED

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Project case: the customer deleted the important data of delete without backup. The customer contacted me and asked to restore the corresponding data. This time, the customer site is reproduced by experiment. Backup is above all else, back up first, then operate

Create a table:

Create table king (age number,name varchar2 (20))

Insert into king values (20 minutes later)

Insert into king values (30dwuzy`)

Commit

Select dbms_rowid.rowid_relative_fno (rowid) rel_fno,dbms_rowid.rowid_block_number (rowid) blockno from king

4 303

Delete from king where age=30

Commit

Results:

Bbed recovery (it is recommended to shut down the database):

Set file 4303

Find / c wuzy

File: / u01/app/oracle/oradata/orcl/users01.dbf (4)

Block: 303 Offsets: 8173 to 8191 Dba:0x0100012f

77757a79 2c000202 c1150472 69636b01 064a2f

P kdbr

BBED > p kdbr

Sb2 kdbr [0] @ 118 8077

Sb2 kdbr [1] @ 120 8066

BBED > p * kdbr [0]

Rowdata [11]

-

Ub1 rowdata [11] @ 8177 0x2c

BBED > p * kdbr [1]

Rowdata [0]

-

Ub1 rowdata [0] @ 8166 0x2c

BBED > set dba 4303 offset 8173

DBA 0x0100012f (16777519 4303)

OFFSET 8173

BBED > d / v dba 4303 offset 8173

File: / u01/app/oracle/oradata/orcl/users01.dbf (4)

Block: 303 Offsets: 8173 to 8191 Dba:0x0100012f

77757a79 2c000202 c1150472 69636b01 l wuzy,....rick.

06c42f l.

BBED > d / v offset 8166

File: / u01/app/oracle/oradata/orcl/users01.dbf (4)

Block: 303 Offsets: 8166 to 8191 Dba:0x0100012f

3c020202 c11f0477 757a792c 000202c1 l modify / x 2c

File: / u01/app/oracle/oradata/orcl/users01.dbf (4)

Block: 303 Offsets: 8166 to 8191 Dba:0x0100012f

2c020202 c11f0477 757a792c 000202c1 15047269 636b0106 c42f

BBED > sum apply

Check value for File 4, Block 303:

Current = 0x6436, required = 0x6436

Results:

The deleted data has been restored.

Note: 3C is deleted data 2C is not deleted data

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report