设为首页 加入收藏

TOP

oracledatafileheaderreplace(测)(一)
2015-07-24 10:05:00 来源: 作者: 【 】 浏览:2
Tags:oracledatafileheaderreplace

SQL> create tablespace rm_tbs datafile 'f1.dbf' size 10m;
Tablespace created.
SQL> select file#,name from v$datafile;
[oracle@VSZ-ORCLE-jftest ~]$ rm /home/oracle/product/10g/dbs/f1.dbf
[oracle@VSZ-ORCLE-jftest ~]$ exit
exit

SQL> select file#,name from v$datafile;
13 /home/oracle/product/10g/dbs/f1.dbf
13 rows selected.
SQL> alter tablespace rm_tbs add datafile 'f2.dbf' size 10m;
Tablespace altered.
SQL> select file#,name from v$datafile;

13 /home/oracle/product/10g/dbs/f1.dbf
14 /home/oracle/product/10g/dbs/f2.dbf
14 rows selected.
SQL> shutdown immediate
ORA-03113: end-of-file on communication channel

[oracle@VSZ-ORCLE-jftest ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jul 25 09:37:29 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup

ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2097656 bytes
Variable Size 654315016 bytes
Database Buffers 1476395008 bytes
Redo Buffers 14675968 bytes
Database mounted.

ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
ORA-01110: data file 13: '/home/oracle/product/10g/dbs/f1.dbf'

SQL>
SQL> select file#||' '||name||' '||bytes from v$datafile;

11 /home/oracle/product/10g/dbs/datafile2.dbf 10485760
12 /home/oracle/product/10g/dbs/system_audit_01.dbf 104857600
13 /home/oracle/product/10g/dbs/f1.dbf 10485760
14 /home/oracle/product/10g/dbs/f2.dbf 10485760

Database mounted.
ORA-01122: database file 13 failed verification check
ORA-01110: data file 13: '/home/oracle/product/10g/dbs/f1.dbf'
ORA-01204: file number is 14 rather than 13 - wrong file

############################## bbed --rdba_kcbh
BBED> map /v
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Dba:0x03400001 --正确数据
------------------------------------------------------------

BBED> p kcvfhbfh

struct kcvfhbfh, 20 bytes @0
ub1 type_kcbh @0 0x0b
ub1 frmt_kcbh @1 0xa2
ub1 spare1_kcbh @2 0x00
ub1 spare2_kcbh @3 0x00
ub4 rdba_kcbh @4 0x03800001 --错误数据:

ub4 bas_kcbh @8 0x00000000
ub2 wrp_kcbh @12 0x0000
ub1 seq_kcbh @14 0x01
ub1 flg_kcbh @15 0x04 (KCBHFCKV)
ub2 chkval_kcbh @16 0xd060
ub2 spare3_kcbh @18 0x0000

BBED> sum apply
Check value for File 13, Block 1:
current = 0xd0a0, required = 0xd0a0

############################## bbed --kcvfhrfn
BBED> show

FILE# 13
BLOCK# 1
OFFSET 368
DBA 0x03400001 (54525953 13,1)
FILENAME /home/oracle/product/10g/dbs/f1.dbf
BIFILE bifile.bbd
LISTFILE /home/oracle/hjbbed/bbedlist
BLOCKSIZE 8192

MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE log.bbd
SPOOL No

BBED> dump
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 368 to 879 Dba:0x03400001
------------------------------------------------------------------------
0e000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 3892b92a 01000000 00000000 00000000

BBED> modify /x 0d
File: /home/oracle/product/10g/dbs/f1.dbf (13)
Block: 1 Offsets: 368 to 879 Dba:0x03400001
------------------------------------------------------------------------
0d000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 3892b92a 01000000 00000000 00000000

BBED> sum apply
Check value for File 13, Block 1:
current = 0xd0a3, required = 0xd0a3

############################## bbed --kccf

首页 上一页 1 2 3 下一页 尾页 1/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)