BBED> print kcvfhcpc
ub4 kcvfhcpc @140 0x00000164
BBED> dump/v dba 7,1 offset 140
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 140 to 169 Dba:0x01c00001
-------------------------------------------------------
64010000 fe522034 63010000 00000000 l d...c.......
00000000 00000000 00000000 0000 l ...........…
BBED> print kcvfhccc
ub4 kcvfhccc @148 0x00000163
BBED> dump/v dba 7,1 offset 148
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 148 to 177 Dba:0x01c00001
-------------------------------------------------------
63010000 00000000 00000000 00000000 l c...............
00000000 00000000 00000000 0000 l ..............
00303f2a 刚好是v$recover_file 中查询到的CHANGE#值
SQL> select to_number('00303f2a','xxxxxxxxx') from dual;
TO_NUMBER('00303F2A','XXXXXXXXX')
---------------------------------
3161898
修改值:
BBED> modify /x a943 dba 7,1 offset 484
BBED> set offset +2
OFFSET 486
BBED> modify /x 3000
BBED> dump /v dba 7,1 offset 484
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 484 to 513 Dba:0x01c00001
-------------------------------------------------------
a9433000 00000000 ad2b4534 01000000 l ........
a8000000 65000000 10000000 0200 l e......…
BBED> modify /x 74314534 dba 7,1 offset 492
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 492 to 521 Dba:0x01c00001
------------------------------------------------------------------------
74314534 01000000 a8000000 65000000 10000000 02000000 00000000 0000
BBED> modify /x 37020000 dba 7,1 offset 140
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 140 to 169 Dba:0x01c00001
------------------------------------------------------------------------
37020000 fe522034 63010000 00000000 00000000 00000000 00000000 0000
BBED> modify /x 36020000 dba 7,1 offset 148
File: /disk2/oradata/sydb/tbs03.dbf (7)
Block: 1 Offsets: 148 to 177 Dba:0x01c00001
------------------------------------------------------------------------
36020000 00000000 00000000 00000000 00000000 00000000 00000000 0000
BBED> sum apply
Check value for File 7, Block 1:
current = 0x7b4d, required = 0x7b4d
确认修改:
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- ---------
7 OFFLINE OFFLINE UNKNOWN ERROR 3163049 13-APR-15
SQL> column name format a35
SQL> select file#,name, CHECKPOINT_CHANGE#,to_char(CHECKPOINT_TIME,'yyyy-mm-dd hh24:mi:ss')checkpoint_time,status,BLOCK_SIZE from v$datafile;
FILE# NAME CHECKPOINT_CHANGE# CHECKPOINT_TIME STATUS BLOCK_SIZE
---------- ----------------------------------- ------------------ ------------------- ------- ----------
1 /u01/app/oradata/sydb/system01.dbf 3163049 2015-04-13 21:11:16 SYSTEM 8192
2 /u01/app/oradata/sydb/sysaux01.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
3 /u01/app/oradata/sydb/undotbs01.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
4 /u01/app/oradata/sydb/users01.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
5 /disk2/oradata/sydb/tbs01.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
6 /disk2/oradata/sydb/tbs02.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
7 /disk2/oradata/sydb/tbs03.dbf 3161898 2015-04-13 20:46:37 RECOVER 8192
8 /tmp/tbs_tmp.dbf 3163049 2015-04-13 21:11:16 ONLINE 8192
控制文件的信息没有被修改也无法通过BBED修改,所以此时无法恢复data file 7;