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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/51726/viewspace-65969/

BBED修改数据文件的SCN相关推荐

  1. 分享:bbed修改数据文件头推进scn与其他数据文件相同

    2019独角兽企业重金招聘Python工程师标准>>> 场景简介: 物理copy表空间数据文件,数据库发生完全检查点,删除该表空间下的数据文件,使该表空间数据文件头的scn与其他数据 ...

  2. 修改oracle的表空间文件scn,分享:bbed修改数据文件头推进scn与其他数据文件相同...

    场景简介: 物理copy表空间数据文件,数据库发生完全检查点,删除该表空间下的数据文件,使该表空间数据文件头的scn与其他数据文件不一致. 场景构造: 1.创建测试表空间 SYS@orser> ...

  3. oracle修改数据前备份,Oracle 之利用BBED修改数据块SCN—-没有备份数据文件的数据恢复...

    测试环境 OS:redhat6.6 oracle:12.1.0.2 BBED(OracleBlockBrowerandEDitor Tool),用来直接查看和修改数据文件数据的一个工具,是Oracle ...

  4. Oracle 之利用BBED修改数据块SCN----没有备份数据文件的数据恢复

    测试环境 OS:redhat6.6 oracle:12.1.0.2  BBED(OracleBlockBrowerandEDitor Tool),用来直接查看和修改数据文件数据的一个工具,是Oracl ...

  5. Oracle BBED单个数据文件跳过所有归档恢复

    场景描述: 数据库利用备份进行恢复时,需要执行restore+recover,restore利用备份片恢复数据文件,recover是进行归档日志应用到最新状态,当我们所有归档日志丢失时,可以利用bbe ...

  6. oracle 控制文件 scn,重建控制文件后, 控制文件中的数据文件检查点SCN来自哪里...

    重建控制文件后, 控制文件中的数据文件检查点SCN来自哪里 这个问题要看具体的情况,比如: 1. 数据库是shutdown immediate,也就是说数据库是一致的状态,重建控制文件后,SCN 以d ...

  7. oracle修改数据文件存储位置,oracle 修改数据库文件位置

    Oracle 体系结构 Oracle 服务器 如图所示:由oracle实例(INSTANCE)和数据库(database)组成. 1) Instance 实例用于管理和调用数据库,是由oracle系统 ...

  8. 添加数据文件及修改数据文件的位置

    恢复后为临时表空间添加数据文件 SQL> alter tablespace temp add file 'D:\oracle\product\10.1.0\oradata\myoracle\t ...

  9. oracle11g数据文件路径,oracle11g修改数据文件路径

    有时候我们想把数据文件移动到其他的目录下,可以按照如下操作: 查看数据文件位置 SQL>  select file_name from sys.dba_data_files; FILE_NAME ...

最新文章

  1. 2021年大数据Hadoop(四):Hadoop发行版公司
  2. 程序员的成长过程 | 每日趣闻
  3. ORACLE中的INTERVAL类型
  4. 管理角色认知-工程师到管理者角色发生了哪些变化?
  5. windbg script ---- 禁用IsDebuggerPresent
  6. 从未有过的空闲学校生活
  7. 从Jupyter Notebook到脚本
  8. (57)FPGA面试题-我们是否应该在敏感列表中包含组合电路的所有输入?
  9. 为什么c语言乘除法优先级低,C语言训练题.docx
  10. 海思Hi3716C多媒体芯片规格书介绍
  11. Flutter 2.5正式版发布,带来重大更新
  12. Mysql 使用Maxscale读写分离,负载均衡
  13. 在线旅游网站技术讲解
  14. 一种兼顾速度和效果的对比度增强算法——CONTRAST ENHANCEMENT BASED ON LAYERED DIFFERENCE REPRESENTATION
  15. MTK处理器心路历程
  16. 全球与中国钠还原剂市场深度研究分析报告
  17. 【redis源码分析】Redis Sentinel 是如何实际解决分布式共识问题的
  18. 2022-2028年全球与中国光谱比色计行业市场深度调研及投资预测分析
  19. 司铭宇老师:新任销售经理新任销售主管培训之角色认知
  20. 12月行业政策丨紧握十四五规划,实现科技创新

热门文章

  1. C语言求一元二次方程根
  2. 超强整理:6大传感器原理
  3. 书摘—做自己的公关专家
  4. Idea自定义注释、作者一键生成详细介绍
  5. windows聚焦壁纸不更新_Win10系统下聚焦锁屏壁纸无法自动更换怎么解决
  6. 网贷之家 python 爬取公开的平台数据
  7. ABAP CDS(Core Data Service)的创建和使用
  8. 王峰 阜阳师范学院计算机,《阜阳师范学院学报》投稿_学报投稿网
  9. TIA博途WINCC的触摸屏VB脚本入门学习(IF THEN ELSE判断语句)
  10. python合并两个数据集_《利用Python进行数据分析》第7章 合并数据集