ITPub博客

首页 > Linux操作系统 > Linux操作系统 > BBED修改数据文件的SCN

BBED修改数据文件的SCN

原创 Linux操作系统 作者:wwllzpz 时间:2019-07-21 16:15:02 0 删除 编辑
BBED修改数据文件的SCN


1.编译BBED

make: *** No rule to make target `ins_rdbms.mk'. Stop.
[oracle@linux2 oracle]$ cd $ORACLE_HOME/rdbms/lib
[oracle@linux2 lib]$ make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/bbed

Linking BBED utility (bbed)
rm -f /oracle/ora9/product/92/rdbms/lib/bbed
gcc -o /oracle/ora9/product/92/rdbms/lib/bbed -L/oracle/ora9/product/92/rdbms/lib/ -L/oracle/ora9/product/92/lib/ -L/oracle/ora9/product/92/lib/stubs/ /oracle/ora9/product/92/lib/s0main.o /oracle/ora9/product/92/rdbms/lib/ssbbded.o /oracle/ora9/product/92/rdbms/lib/sbbdpt.o `cat /oracle/ora9/product/92/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 /oracle/ora9/product/92/rdbms/lib/defopt.o -ldbtools9 -lclntsh `cat /oracle/ora9/product/92/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/ora9/product/92/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lclient9 -lvsn9 -lwtc9 -lcommon9 -lgeneric9 -lwtc9 -lmm -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/ora9/product/92/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lnro9 `cat /oracle/ora9/product/92/lib/ldflags` -lnsslb9 -lncrypt9 -lnsgr9 -lnzjs9 -ln9 -lnl9 -lclient9 -lvsn9 -lwtc9 -lcommon9 -lgeneric9 -ltrace9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 -lclient9 -lvsn9 -lwtc9 -lcommon9 -lgeneric9 -lnls9 -lcore9 -lnls9 -lcore9 -lnls9 -lxml9 -lcore9 -lunls9 -lnls9 `cat /oracle/ora9/product/92/lib/sysliblist` -Wl,-rpath,/oracle/ora9/product/92/lib:/lib:/usr/lib -lm `cat /oracle/ora9/product/92/lib/sysliblist` -ldl -lm

这里的密码默认是blockedit
[oracle@linux2 lib]$ ./bbed
Password:

BBED: Release 2.0.0.0.0 - Limited Production on Wed May 9 13:19:23 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> exit

2. Data file headers

alter session set events 'immediate trace name FILE_HDRS level 10';

[oracle@linux2 udump]$ cat ora9i2_ora_3374.trc
/oracle/ora9/admin/ora9i/udump/ora9i2_ora_3374.trc
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /oracle/ora9/product/92
System name: Linux
Node name: linux2
Release: 2.4.21-40.EL
Version: #1 Thu Feb 2 22:32:00 EST 2006
Machine: i686
Instance name: ora9i2
Redo thread mounted by this instance: 2
Oracle process number: 15
Unix process pid: 3374, image: oracle@linux2 (TNS V1-V3)

*** SESSION ID:(16.3) 2007-05-09 16:30:36.931
CMCLI WARNING: CMInitContext: init ctx(0xc8830c8)
*** 2007-05-09 17:23:35.040
DUMP OF DATA FILES: 6 files in database

DATA FILE #1:
(name #3) /dev/raw/raw4
creation size=51200 block size=8192 status=0xe head=3 tail=3 dup=1
tablespace 0, index=1 krfil=1 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:266 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.00000007 04/10/2007 13:52:09
thread:1 rba:(0x1.3.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.000ced7f prev_range: 0
Online Checkpointed at scn: 0x0000.000ced80 05/08/2007 14:00:21
thread:1 rba:(0x1.2.0)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=51200=0xc800
File Number=1, Blksiz=8192, File Type=3 DATA
Tablespace #0 - SYSTEM rel_fn:1
Creation at scn: 0x0000.00000007 04/10/2007 13:52:09
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 05/09/2007 13:54:48
status:0x4 root dba:0x004001a1 chkpt cnt: 266 ctl cnt:265
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00

DATA FILE #2:
(name #4) /dev/raw/raw2
creation size=38400 block size=8192 status=0xe head=4 tail=4 dup=1
tablespace 1, index=2 krfil=2 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:266 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.00001356 04/10/2007 13:52:36
thread:1 rba:(0x1.4407.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.000ced7f prev_range: 0
Online Checkpointed at scn: 0x0000.000ced80 05/08/2007 14:00:21
thread:1 rba:(0x1.2.0)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=38400=0x9600
File Number=2, Blksiz=8192, File Type=3 DATA
Tablespace #1 - UNDOTBS1 rel_fn:2
Creation at scn: 0x0000.00001356 04/10/2007 13:52:36
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 05/09/2007 13:54:48
status:0x4 root dba:0x00000000 chkpt cnt: 266 ctl cnt:265
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00

DATA FILE #3:
(name #6) /dev/raw/raw7
creation size=12800 block size=8192 status=0xe head=6 tail=6 dup=1
tablespace 3, index=4 krfil=3 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:263 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.00001928 04/10/2007 13:52:51
thread:1 rba:(0x2.6b9.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.000ced7f prev_range: 0
Online Checkpointed at scn: 0x0000.000ced80 05/08/2007 14:00:21
thread:1 rba:(0x1.2.0)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=12800=0x3200
File Number=3, Blksiz=8192, File Type=3 DATA
Tablespace #3 - INDX rel_fn:3
Creation at scn: 0x0000.00001928 04/10/2007 13:52:51
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 05/09/2007 13:54:48
status:0x4 root dba:0x00000000 chkpt cnt: 263 ctl cnt:262
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00

DATA FILE #4:
(name #7) /dev/raw/raw3
creation size=38400 block size=8192 status=0xe head=7 tail=7 dup=1
tablespace 4, index=5 krfil=4 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:264 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.0000193d 04/10/2007 13:52:59
thread:1 rba:(0x2.6cd.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.000ced7f prev_range: 0
Online Checkpointed at scn: 0x0000.000ced80 05/08/2007 14:00:21
thread:1 rba:(0x1.2.0)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=38400=0x9600
File Number=4, Blksiz=8192, File Type=3 DATA
Tablespace #4 - UNDOTBS2 rel_fn:4
Creation at scn: 0x0000.0000193d 04/10/2007 13:52:59
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 05/09/2007 13:54:48
status:0x4 root dba:0x00000000 chkpt cnt: 264 ctl cnt:263
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00

DATA FILE #5:
(name #12) /ocfs01/undotab3.dbf
creation size=38400 block size=8192 status=0xe head=12 tail=12 dup=1
tablespace 6, index=6 krfil=5 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:214 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.00037b9b 04/19/2007 10:08:20
thread:2 rba:(0xb.2a2.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.000ced7f prev_range: 0
Online Checkpointed at scn: 0x0000.000ced80 05/08/2007 14:00:21
thread:1 rba:(0x1.2.0)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=38400=0x9600
File Number=5, Blksiz=8192, File Type=3 DATA
Tablespace #6 - UNDOTBS3 rel_fn:5
Creation at scn: 0x0000.00037b9b 04/19/2007 10:08:20
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 05/09/2007 13:54:48
status:0x4 root dba:0x00000000 chkpt cnt: 214 ctl cnt:213
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00

DATA FILE #6:
(name #11) /ocfs01/a1.ora
creation size=128 block size=8192 status=0xe head=11 tail=11 dup=1
tablespace 7, index=7 krfil=6 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:6 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.000d8fc1 05/09/2007 13:58:21
thread:2 rba:(0x2.81.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.00000000 prev_range: 0
Online Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=128=0x80
File Number=6, Blksiz=8192, File Type=3 DATA
Tablespace #7 - A1 rel_fn:6
Creation at scn: 0x0000.000d8fc1 05/09/2007 13:58:21
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 01/01/1988 00:00:00
status:0x4 root dba:0x00000000 chkpt cnt: 6 ctl cnt:5
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
DUMP OF TEMP FILES: 1 files in database

TEMP FILE #1: External File #201
creation size=32000 block size=8192 status=0xe head=0 tail=0 dup=0
tablespace 2, index=3 krfil=1 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

可以看到数据文件 DATA FILE #6: /ocfs01/a1.ora的SCN:

Checkpointed at scn: 0x0000.000de710 05/09/2007 17:07:49

在FILE #6中用BBED搜索该scn:000de710.

数据文件头在数据文件的第一个BLOCK里.

BBED> show
FILE# 6
BLOCK# 1
OFFSET 112
DBA 0x01800001 (25165825 6,1)
FILENAME /ocfs01/a1.ora
BIFILE bifile.bbd
LISTFILE a.txt
BLOCKSIZE 8192
MODE Edit
EDIT Unrecoverable
IBASE Dec
OBASE Dec
WIDTH 80
COUNT 512
LOGFILE log.bbd
SPOOL No

BBED> find /x 10e70d00 top
File: /ocfs01/a1.ora (6)
Block: 1 Offsets: 140 to 651 Dba:0x01800001
------------------------------------------------------------------------
10e70d00 0000ffbf e5201525 02000000 02000000 3b050000 10000000 06000000
00000000 06000000 00000000 05000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 07000000 02004131 00000000 00000000 00000000 00000000
00000000 00000000 00000000 06000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> modify /x 000de710 file 6 block 1 offset 140
File: /ocfs01/a1.ora (6)
Block: 1 Offsets: 140 to 651 Dba:0x01800001
------------------------------------------------------------------------
000de710 0000ffbf e5201525 02000000 02000000 3b050000 10000000 06000000
00000000 06000000 00000000 05000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 07000000 02004131 00000000 00000000 00000000 00000000
00000000 00000000 00000000 06000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> dump file 6 block 1 offset 140
File: /ocfs01/a1.ora (6)
Block: 1 Offsets: 140 to 651 Dba:0x01800001
------------------------------------------------------------------------
000de710 0000ffbf e5201525 02000000 02000000 3b050000 10000000 06000000
00000000 06000000 00000000 05000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 07000000 02004131 00000000 00000000 00000000 00000000
00000000 00000000 00000000 06000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

再dump文件头,可以看到/ocfs01/a1.ora的SCN已经更改了.

Checkpointed at scn: 0x0000.10e70d00 05/09/2007 17:07:49


DATA FILE #6:
(name #11) /ocfs01/a1.ora
creation size=128 block size=8192 status=0xe head=11 tail=11 dup=1
tablespace 7, index=7 krfil=6 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:6 scn: 0x0000.000de710 05/09/2007 17:07:49
Stop scn: 0xffff.ffffffff 05/09/2007 15:07:30
Creation Checkpointed at scn: 0x0000.000d8fc1 05/09/2007 13:58:21
thread:2 rba:(0x2.81.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.00000000 prev_range: 0
Online Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Hot Backup end marker scn: 0x0000.00000000
aux_file is NOT DEFINED
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2419156282=0x9031653a, Db Name='ORA9I'
Activation ID=0=0x0
Control Seq=2389=0x955, File size=128=0x80
File Number=6, Blksiz=8192, File Type=3 DATA
Tablespace #7 - A1 rel_fn:6
Creation at scn: 0x0000.000d8fc1 05/09/2007 13:58:21
Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
reset logs count:0x2513a375 scn: 0x0000.000ced80 recovered at 01/01/1988 00:00:00
status:0x4 root dba:0x00000000 chkpt cnt: 6 ctl cnt:5
begin-hot-backup file size: 0
Checkpointed at scn: 0x0000.10e70d00 05/09/2007 17:07:49
thread:2 rba:(0x2.53b.10)
enabled threads: 01100000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Backup Checkpointed at scn: 0x0000.00000000
thread:0 rba:(0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
External cache id: 0x0 0x0 0x0 0x0
Absolute fuzzy scn: 0x0000.00000000
Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
Terminal Recovery Stamp scn: 0x0000.00000000 01/01/1988 00:00:00
DUMP OF TEMP FILES: 1 files in database

TEMP FILE #1: External File #201
creation size=32000 block size=8192 status=0xe head=0 tail=0 dup=0
tablespace 2, index=3 krfil=1 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

SQL> select name,checkpoint_change# from v$datafile_header;

NAME
--------------------------------------------------------------------------------
CHECKPOINT_CHANGE#
------------------
/dev/raw/raw4
911120

/dev/raw/raw2
911120

/dev/raw/raw7
911120


NAME
--------------------------------------------------------------------------------
CHECKPOINT_CHANGE#
------------------
/dev/raw/raw3
911120

/ocfs01/undotab3.dbf
911120

/ocfs01/a1.ora
283577600


6 rows selected.

验证该block

BBED> verify
DBVERIFY - Verification starting
FILE = /ocfs01/a1.ora
BLOCK = 1

Block 1 is corrupt
***
Corrupt block relative dba: 0x01800001 (file 0, block 1)
Bad check value found during verification
Data in bad block -
type: 11 format: 2 rdba: 0x01800001
last change scn: 0x0000.00000000 seq: 0x1 flg: 0x04
consistency value in tail: 0x00000b01
check value in block header: 0xe603, computed block checksum: 0xfafa
spare1: 0x0, spare2: 0x0, spare3: 0x0
***


DBVERIFY - Verification complete

Total Blocks Examined : 1
Total Blocks Processed (Data) : 0
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 1
Total Blocks Influx : 0

可以看到该BLOCK已经 Corrupt ,修复 该BLOCK

BBED> sum file 6 block 1 apply
Check value for File 6, Block 1:
current = 0x1cf9, required = 0x1cf9

BBED> verify
DBVERIFY - Verification starting
FILE = /ocfs01/a1.ora
BLOCK = 1


DBVERIFY - Verification complete

Total Blocks Examined : 1
Total Blocks Processed (Data) : 0
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/51726/viewspace-65969/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2003-07-10

  • 博文量
    66
  • 访问量
    42612