-------------------------------------------------------
?cf581300 00000000 00000000 00000000 l .X..............
?00000000 00000400 7f000000 780d ? ? l ............x.
?<16 bytes per line>
BBED> modify /x 975b
?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)
?Block: 1 ? ? ? ? ? ? ? ?Offsets: ?116 to ?145 ? ? ? ? ? Dba:0x01400001
------------------------------------------------------------------------
?975b1300 00000000 00000000 00000000 00000000 00000400 7f000000 780d?
?<32 bytes per line>
BBED> sum apply
Check value for File 5, Block 1:
current = 0xefbf, required = 0xefbf
SQL> select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;
? ? ?HXFIL CHANGE# ? ? ? ? ? ? ? ? ? ? ? ? ? ? FHRLC_I TIME
---------- -------------------------------- ---------- ----------------------------------------
? ? ? ? ?1 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
? ? ? ? ?2 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
? ? ? ? ?3 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
? ? ? ? ?4 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
? ? ? ? ?5 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
? ? ? ? ?6 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40
6 rows selected.
注意下面,我们上面虽然用bbed调整了数据文件头部的restlogs scn 和resetlogs count 使之和控制文件保持一样,不过我们online 数据文件时会接着报需要介质恢复。如下:
SQL> alter database datafile 5 online;
alter database datafile 5 online
*
ERROR at line 1:
ORA-01113: file 5 needs media recovery
ORA-01110: data file 5: '/u01/app/oracle/oradata/satdb/data01.dbf'
4、用bbed调整数据文件头部检查点以及scn相关值
我们还应改如下偏移量
ub4 kcvfhcpc @140 0x00000308------检查点计数
ub4 kcvfhccc @148 0x00000307------总是比检查点计算少1
ub4 kcvcptim @492 0x2f9af923-----检查点时间
ub4 kscnbas @484 0x8013ea80-------- scn的低位
ub2 kscnwrp @488 0x0000--------- scn的高位
BBED> dump /v dba 1,1 offset 140 count 30
?File: /u01/app/oracle/oradata/satdb/system01.dbf (1)
?Block: 1 ? ? ? Offsets: ?140 to ?169 ?Dba:0x00400001
-------------------------------------------------------
?cf000000 88112a35 ce000000 00000000 l ......*5........
?00000000 00000000 00000000 0000 ? ? l ..............
?<16 bytes per line>
BBED> dump /v dba 5,1 offset 140 count 30
?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)
?Block: 1 ? ? ? Offsets: ?140 to ?169 ?Dba:0x01400001
-------------------------------------------------------
?7f000000 780d2a35 7e000000 00000000 l ....x.*5~.......
?00000000 00000000 00000000 0000 ? ? l ..............
?<16 bytes per line>
BBED> modify /x cf
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)
?Block: 1 ? ? ? ? ? ? ? ?Offsets: ?140 to ?169 ? ? ? ? ? Dba:0x01400001
------------------------------------------------------------------------
?cf000000 780d2a35 7e000000 00000000 00000000 00000000 00000000 0000?
?<32 bytes per line>
BBED> dump /v dba 1,1 offset 148 count 30
?File: /u01/app/oracle/oradata/satdb/system01.dbf (1)
?Block: 1 ? ? ? Offsets: ?148 to ?177 ?Dba:0x00400001
-------------------------------------------------------
?ce000000 00000000 00000000 00000000 l ................
?00000000 00000000 00000000 0000 ? ? l ..............
?<16 bytes per line>
BBED> dump /v dba 5,1 offset 148 count 30
?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)
?Block: 1 ? ? ? Offsets: ?148 to ?177 ?Dba:0x01400001
-------------------------------------------------------
?7e000000 00000000 00000000 00000000 l ~...............
?00000000 00000000 00000000 0000 ? ? l ..............
?<16 bytes per line>
BBED> modify /x ce
?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)
?Block: 1 ? ? ? ? ? ? ? ?Offsets: ?148 to