Project case: Customer deleted delete important data, no backup, customer contact me, request to restore the corresponding data. This time through the experimental way to reproduce the customer site. Backup above everything, backup first, then operate
To create a table:
CREATE TABLE King (age number,name varchar2 (20));
Insert INTO King values ("Rick");
Insert into King values (' Wuzy ');
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:
650) this.width=650; "title=" Qq20160613232321.png "alt=" wkiol1de0tmbqwcqaaajzhw7uwa846.png "src="/HTTP/ S5.51cto.com/wyfs02/m02/82/b4/wkiol1de0tmbqwcqaaajzhw7uwa846.png "/>
bbed Recovery (it is recommended to close the database):
Set File 4,303
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 4,303 offset 8173
DBA 0x0100012f (16777519 4,303)
OFFSET 8173
bbed> d/v dba 4,303 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.
<16 bytes per line>
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 <....wuzy,...
15047269 636b0106 c42f L.. Rick..
<16 bytes per line>
Bbed> 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
<32 bytes per line>
bbed> sum apply
Check value for File 4, Block 303:
Current = 0x6436, required = 0x6436
results:650) this.width=650; "title=" 1.png "alt=" Wkiol1de0zdsc0qlaaam8q4vjvs581.png "src=" http://s2.51cto.com/ Wyfs02/m02/82/b4/wkiol1de0zdsc0qlaaam8q4vjvs581.png "/>
The deletion data has been restored.
Note: 3 C is the data that has been deleted 2 C is not deleted
How to retrieve deleted data via bbed