设为首页 加入收藏

TOP

oracledatafileheaderreplace(测)(二)
2015-07-24 10:05:00 来源: 作者: 【 】 浏览:1
Tags:oracledatafileheaderreplace
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+ -

首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle11GDataGuardORA-16086问题.. 下一篇关于oracle sql语句查询时表名和..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)