实例恢复、媒介恢复、正常启动 -- SCN的区别

废话少说,看一下下面的数据吧......[@more@]

l 数据文件方面:

需要进行实例恢复的SCN

---------------------------------------------------------------------------------------------

DATA FILE #9:

来自控制文件:

(name #5) D:DATABASEORACLE9IORADATAORADBUSERS01.DBF

creation size=0 block size=8192 status=0xe head=5 tail=5 dup=1

tablespace 9, index=9 krfil=9 prev_file=0

unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

Checkpoint cnt:135 scn: 0x0000.00176d7a 08/11/2006 00:06:12

Stop scn: 0xffff.ffffffff 08/09/2006 19:12:40

Creation Checkpointed at scn: 0x0000.00001901 05/12/2002 16:19:36

thread:0 rba:(0x0.0.0)

enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000

Offline scn: 0x0000.0002e871 prev_range: 0

Online Checkpointed at scn: 0x0000.0002e872 07/20/2006 22:55:23

thread:1 rba:(0x1.2.0)

enabled threads: 01000000 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=2349593689=0x8c0bf459, Db Name='ORADB'

Activation ID=0=0x0

Control Seq=580=0x244, File size=3200=0xc80

File Number=9, Blksiz=8192, File Type=3 DATA

Tablespace #9 - USERS rel_fn:9

Creation at scn: 0x0000.00001901 05/12/2002 16:19:36

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0

reset logs count:0x238b41db scn: 0x0000.0002e872 recovered at 08/10/2006 22:37:15

status:0x4 root dba:0x00000000 chkpt cnt: 135 ctl cnt:134

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.00176d7a 08/11/2006 00:06:12

thread:1 rba:(0x2d.2.10)

enabled threads: 01000000 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

---------------------------------------------------------------------------------------------

需要进行媒介恢复的SCN

--------------------------------------------------------------------------------------------

DATA FILE #9:

(name #5) D:DATABASEORACLE9IORADATAORADBUSERS01.DBF

creation size=0 block size=8192 status=0xe head=5 tail=5 dup=1

tablespace 9, index=9 krfil=9 prev_file=0

unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

Checkpoint cnt:140 scn: 0x0000.0017d4d2 08/12/2006 16:53:08

Stop scn: 0x0000.0017d4d2 08/12/2006 16:53:08

Creation Checkpointed at scn: 0x0000.00001901 05/12/2002 16:19:36

thread:0 rba:(0x0.0.0)

enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000

Offline scn: 0x0000.0002e871 prev_range: 0

Online Checkpointed at scn: 0x0000.0002e872 07/20/2006 22:55:23

thread:1 rba:(0x1.2.0)

enabled threads: 01000000 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=2349593689=0x8c0bf459, Db Name='ORADB'

Activation ID=0=0x0

Control Seq=580=0x244, File size=3200=0xc80

File Number=9, Blksiz=8192, File Type=3 DATA

Tablespace #9 - USERS rel_fn:9

Creation at scn: 0x0000.00001901 05/12/2002 16:19:36

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0

reset logs count:0x238b41db scn: 0x0000.0002e872 recovered at 08/10/2006 22:37:15

status:0x4 root dba:0x00000000 chkpt cnt: 135 ctl cnt:134

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.00176d7a 08/11/2006 00:06:12

thread:1 rba:(0x2d.2.10)

enabled threads: 01000000 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 #9:

(name #5) D:DATABASEORACLE9IORADATAORADBUSERS01.DBF

creation size=0 block size=8192 status=0xe head=5 tail=5 dup=1

tablespace 9, index=9 krfil=9 prev_file=0

unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00

Checkpoint cnt:145 scn: 0x0000.00182f8a 08/12/2006 17:50:11

Stop scn: 0x0000.00182f8a 08/12/2006 17:50:11

Creation Checkpointed at scn: 0x0000.00001901 05/12/2002 16:19:36

thread:0 rba:(0x0.0.0)

enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000

Offline scn: 0x0000.0002e871 prev_range: 0

Online Checkpointed at scn: 0x0000.0002e872 07/20/2006 22:55:23

thread:1 rba:(0x1.2.0)

enabled threads: 01000000 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=2349593689=0x8c0bf459, Db Name='ORADB'

Activation ID=0=0x0

Control Seq=604=0x25c, File size=3200=0xc80

File Number=9, Blksiz=8192, File Type=3 DATA

Tablespace #9 - USERS rel_fn:9

Creation at scn: 0x0000.00001901 05/12/2002 16:19:36

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0

reset logs count:0x238b41db scn: 0x0000.0002e872 recovered at 08/12/2006 17:49:19

status:0x0 root dba:0x00000000 chkpt cnt: 145 ctl cnt:144

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.00182f8a 08/12/2006 17:50:11

thread:1 rba:(0x30.1b5.10)

enabled threads: 01000000 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

--------------------------------------------------------------------------------------------

注:上面的资料都是在数据库处于mount状态下通过命令alter session set events 'immediate trace name file_hdrs level 10';取得的。

l 控制文件方面:

需要进行恢复

----------------------------------------------------------------------------------

***************************************************************************

CHECKPOINT PROGRESS RECORDS

***************************************************************************

(blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)

THREAD #1 - status:0x2 flags:0x0 dirty:90

low cache rba:(0x30.1b6.0) on disk rba:(0x30.2bf.0)

on disk scn: 0x0000.00183005 08/12/2006 18:02:01

resetlogs scn: 0x0000.0002e872 07/20/2006 22:55:23

heartbeat: 598284503 mount id: 2351596607

MTTR statistics status: 3

Init time: Avg: 13318544, Times measured: 3

File open time: Avg: 79889, Times measured: 36

Log block read time: Avg: 65, Times measured: 34182

Data block handling time: Avg: 5168, Times measured: 306

----------------------------------------------------------------------------------

不进行恢复

----------------------------------------------------------------------------------

CHECKPOINT PROGRESS RECORDS

***************************************************************************

(blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)

THREAD #1 - status:0x1 flags:0x0 dirty:0

low cache rba:(0xffffffff.ffffffff.ffff) on disk rba:(0x31.161.0)

on disk scn: 0x0000.00187f11 08/12/2006 18:21:40

resetlogs scn: 0x0000.0002e872 07/20/2006 22:55:23

heartbeat: 598309714 mount id: 2351554252

MTTR statistics status: 3

Init time: Avg: 13430464, Times measured: 3

File open time: Avg: 70189, Times measured: 37

Log block read time: Avg: 65, Times measured: 33829

Data block handling time: Avg: 4620, Times measured: 320

----------------------------------------------------------------------------------

注:

Low cache RBA: The low RBA of the checkpoint queues indicate where recovery

can begin. All buffers with lower RBAs were already written. Note that the buffer, or

buffers, at this low RBA may be in the middle of a disk write when this value is

constructed.

On Disk RBA: The on disk RBA is the highest RBA that is definitely on disk.

Instance recovery must apply redo at least up to here. There are unusual

circumstances where the on disk RBA may actually be lower than the low RBA. In

these circumstances, the dirty buffers could not be written because a log force is

needed. If the instance dies without a log force, then the redo at the low RBA may not

even exist. Process death during redo generation, and buffer invalidation due to

offline immediate, may remove the buffer at the on disk RBA from the checkpoint

queue.

注:上面的资料都是在数据库处于mount状态下通过命令alter session set events 'immediate trace name controlf level 4';取得的。

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

转载于:http://blog.itpub.net/814/viewspace-855884/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值