hfno
BBED> p kcvfhhdr
struct kcvfhhdr, 76 bytes @20
ub4 kccfhswv @20 0x00000000
ub4 kccfhcvn @24 0x0a200500
ub4 kccfhdbi @28 0x07e116ae
text kccfhdbn[0] @32 T
text kccfhdbn[1] @33 E
text kccfhdbn[2] @34 X
text kccfhdbn[3] @35 T
text kccfhdbn[4] @36
text kccfhdbn[5] @37
text kccfhdbn[6] @38
text kccfhdbn[7] @39
ub4 kccfhcsq @40 0x000091ad
ub4 kccfhfsz @44 0x00000500
s_blkz kccfhbsz @48 0x00
ub2 kccfhfno @52 0x000e
############################## bbed --kscnbas
BBED> modify /x 0d
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 52 to 563 Dba:0x03400001
------------------------------------------------------------------------
0d000300 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BBED> p kcvfhcrs
struct kcvfhcrs, 8 bytes @100
ub4 kscnbas @100 0x01addf00
ub2 kscnwrp @104 0x0000
BBED> set offset 100
OFFSET 100
BBED> dump
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 100 to 611 Dba:0x03400001
------------------------------------------------------------------------
00dfad01 00000000 378ee432 b01a642f a9ec0500 00000000 00000000 00000000
00000000 00000400 02000000 00000000 01000000 00000000 00000000 00000000
BBED> modify /x cc
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 100 to 611 Dba:0x03400001
------------------------------------------------------------------------
ccdfad01 00000000 378ee432 b01a642f a9ec0500 00000000 00000000 00000000
BBED> sum apply
############################## bbed --kscnbas
SQL> alter database datafile 13 online;
alter database datafile 13 online
*
ERROR at line 1:
ORA-01122: database file 13 failed verification check
ORA-01110: data file 13: '/home/oracle/product/10g/dbs/f1.dbf'
ORA-01202: wrong incarnation of this file - wrong creation time
############################## bbed --kcvfhcrt
BBED> p kcvfhcrt
ub4 kcvfhcrt @108 0x32e48e37
BBED> set offset 108
OFFSET 108
BBED> dump
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 108 to 619 Dba:0x03400001
------------------------------------------------------------------------
378ee432 b01a642f a9ec0500 00000000 00000000 00000000 00000000 00000400
02000000 00000000 01000000 00000000 00000000 00000000 00000000 00000000
BBED> modify /x 8d
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 109 to 620 Dba:0x03400001
------------------------------------------------------------------------
8de432b0 1a642fa9 ec050000 00000000 00000000 00000000 00000000 00040002
00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000
BBED> sum apply
Check value for File 13, Block 1:
current = 0xd2b3, required = 0xd2b3
SQL> select file#,to_char(creation_time,'yyyymmdd hh24miss') from v$datafile;
12 20140709 153030
13 20140725 093536
14 20140725 093655
SQL> alter database datafile 13 online;
alter database datafile 13 online
ERROR at line 1:
ORA-01113: file 13 needs media recovery if it was restored from backup, or END 【不重启服务器可能没这个问题】
BACKUP if it was not
ORA-01110: data file 13: '/home/oracle/product/10g/dbs/f1.dbf'
SQL> recover datafile 13;
Media recovery complete.
SQL> alter database datafile 13 online;
Database altered.
--时间信息换算如下:
SELECT TO_NUMBER('32e48e37','XXXXXXXX') from dual
853839415 --十进制
26 06 24 09 36 55--差异天数
时间原来这样算
select 26*12*31*24*60*60 --年
+6*31*24*60*60+ --月
24*24*60*60+ --天
9*60*60+ -