SCOTT@book> @ rowid AAAWFfAAGAAAAEBABJ
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
90463 6 257 73 0x1800101 6,257 alter system dump datafile 6 block 257 ;
--//dba=6,257块上有数据.
SCOTT@book> insert into t select * from all_objects where rownum<=1;
1 row created.
SCOTT@book> commit ;
Commit complete.
SCOTT@book> alter system flush buffer_cache;
System altered.
SCOTT@book> @ rowid AAAWFfAAGAAAAECAAA
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
90463 6 258 0 0x1800102 6,258 alter system dump datafile 6 block 258 ;
--//dba=6,258块上有数据.通过bbed观察dba=6,259
BBED> map dba 6,259
File: /mnt/ramdisk/book/tea01.dbf (6)
Block: 259 Dba:0x01800103
------------------------------------------------------------
KTB Data Block (Table/Cluster)
struct kcbh, 20 bytes @0
struct ktbbh, 72 bytes @20
struct kdbh, 14 bytes @92
struct kdbt[0], 0 bytes @106
sb2 kdbr[0] @106
ub1 freespace[8082] @106
ub1 rowdata[0] @8188
ub4 tailchk @8188
--//可以发现dba=6,259已经格式化.但是没有数据.
SCOTT@book> select count(*) from t;
COUNT(*)
----------
10001
--//OK一切正常.现在破坏dba=6,259
BBED> set offset 0
OFFSET 0
--//注意一定要设置offset 0,不然可能copy仅仅剩下的部分.
BBED> copy filename '/home/oracle/backup/tea01.dbf' block 259 to filename '/mnt/ramdisk/book/tea01.dbf' block 259
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
File: /mnt/ramdisk/book/tea01.dbf (6)
Block: 259 Offsets: 0 to 63 Dba:0x01800103
------------------------------------------------------------------------------------------------------------------------------------------------
00a20000 03018001 00000000 00000105 83a70000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<64 bytes per line>
--//现在已经未格式化块.
4.继续测试:
SCOTT@book> alter system flush buffer_cache;
System altered.