|
sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.6.0 - Production on Sat Jul 22 18:39:19 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning option
JServer Release 9.2.0.6.0 - Production
SQL> alter session set events 'immediate trace name CONTROLF level 10' ;
Session altered.
SQL> @gettracefile
TRACE_FILE_NAME
------------------------------------------------------------------------------------------------------------------------
d:\oracle\admin\ora920\udump\ora920_ora_3848.trc
*** 2006-07-26 11:32:20.149
DUMP OF CONTROL FILES, Seq # 1661 = 0x67d
FILE HEADER:
Software vsn=153092096=0x9200000, Compatibility Vsn=134217728=0x8000000
Db ID=2602367092=0x9b1cf874, Db Name='ORA920' --------------数据库dbid和数据库名称
Activation ID=0=0x0
Control Seq=1661=0x67d, File size=246=0xf6 ----------这个seq是指?
File Number=0, Blksiz=8192, File Type=1 CONTROL
***************************************************************************
DATABASE ENTRY
***************************************************************************
(blkno = 0x1, size = 192, max = 1, in-use = 1, last-recid= 0)
DF Version: creation=0x9200000 compatible=0x8000000, Date 07/12/2006 16:42:28
DB Name "ORA920"
Database flags = 0x00404001
Controlfile Creation Timestamp 07/12/2006 16:42:29
Incmplt recovery scn: 0x0000.00000000
Resetlogs scn: 0x0000.0031e017 Resetlogs Timestamp 07/26/2006 10:59:33
Prior resetlogs scn: 0x0000.0002e872 Prior resetlogs Timestamp 07/12/2006 16:42:29
Redo Version: creation=0x9200000 compatable=0x9200000
#Data files = 11, #Online files = 11
Database checkpoint: Thread=1 scn: 0x0000.0031e018
Threads: #Enabled=1, #Open=1, Head=1, Tail=1
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Max log members = 5, Max data members = 1
Arch list: Head=3, Tail=3, Force scn: 0x0000.00000000scn: 0x0000.003013cf
Controlfile Checkpointed at scn: 0x0000.0031e03c 07/26/2006 10:59:41
thread:0 rba 0x0.0.0)
---------------正常online的时候rba为0,thread 0表示没有redo要应用来恢复数据库。
---------------在数据库不一致时,就会有相关的值从数据文件头读出。
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
***************************************************************************
CHECKPOINT PROGRESS RECORDS
***************************************************************************
(blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)
THREAD #1 - status:0x2 flags:0x0 dirty:65
low cache rba 0x1.28c.0) on disk rba 0x1.f20.0)
on disk scn: 0x0000.0031f3a8 07/26/2006 11:32:07
---------------竟然大于"DATABASE ENTRY"中的controlfiel Checkpointed at scn。这个怎么解释?相差超过半个小时!
resetlogs scn: 0x0000.0031e017 07/26/2006 10:59:33
heartbeat: 596786839 mount id: 2603565311
MTTR statistics status: 3
Init time: Avg: 17149513, Times measured: 3
File open time: Avg: 126237, Times measured: 36
Log block read time: Avg: 46, Times measured: 36394
Data block handling time: Avg: 4978, Times measured: 437 <------这几项计数怎么看呢?
***************************************************************************
EXTENDED DATABASE ENTRY
***************************************************************************
(blkno = 0x7a, size = 276, max = 1, in-use = 1, last-recid= 0)
Control AutoBackup date(dd/mm/yyyy)=12/ 7/2006
Next AutoBackup sequence= 0
***************************************************************************
REDO THREAD RECORDS
***************************************************************************
(blkno = 0x4, size = 104, max = 1, in-use = 1, last-recid= 0)
THREAD #1 - status:0xf thread links forward:0 back:0
#logs:3 first:1 last:3 current:3 last used seq#:0x1
enabled at scn: 0x0000.0031e017 07/26/2006 10:59:33
disabled at scn: 0x0000.00000000 01/01/1988 00:00:00
opened at 07/26/2006 10:59:39 by instance ora920
Checkpointed at scn: 0x0000.0031e018 07/26/2006 10:59:39
thread:1 rba 0x1.2.10)
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
log history: 0
***************************************************************************
LOG FILE RECORDS
***************************************************************************
(blkno = 0x5, size = 72, max = 50, in-use = 3, last-recid= 6)
LOG FILE #1:
(name #3) D:\ORACLE\ORADATA\ORA920\REDO01.LOG
Thread 1 redo log links: forward: 2 backward: 0
siz: 0x32000 seq: 0x00000000 hws: 0x2 bsz: 512 nab: 0x2 flg: 0x1 dup: 1
Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.00000000
Low scn: 0x0000.00000000 01/01/1988 00:00:00
Next scn: 0x0000.00000000 01/01/1988 00:00:00
LOG FILE #2:
(name #2) D:\ORACLE\ORADATA\ORA920\REDO02.LOG
Thread 1 redo log links: forward: 3 backward: 1
siz: 0x32000 seq: 0x00000000 hws: 0x2 bsz: 512 nab: 0x2 flg: 0x1 dup: 1
Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.00000000
Low scn: 0x0000.00000000 01/01/1988 00:00:00
Next scn: 0x0000.00000000 01/01/1988 00:00:00
LOG FILE #3:
(name #1) D:\ORACLE\ORADATA\ORA920\REDO03.LOG
Thread 1 redo log links: forward: 0 backward: 2
siz: 0x32000 seq: 0x00000001 hws: 0x3 bsz: 512 nab: 0xffffffff flg: 0x8 dup: 1
--------------------------- siz: 0x32000是指块尺寸,而块的大小是bsz: 512 ,总的大小是100M。
Archive links: fwrd: 0 back: 0 Prev scn: 0x0000.00000000
Low scn: 0x0000.0031e017 07/26/2006 10:59:33
Next scn: 0xffff.ffffffff 07/26/2006 10:59:33
------------------------一个logfile的文件名,thread,循环使用的前后日志,因为是当前日志,当然只能把Next scn置为最大值。
***************************************************************************
DATA FILE RECORDS
***************************************************************************
(blkno = 0x6, size = 180, max = 100, in-use = 11, last-recid= 641)
DATA FILE #1:
(name #8) D:\ORACLE\ORADATA\ORA920\SYSTEM01.DBF
creation size=0 block size=8192 status=0xe head=8 tail=8 dup=1
tablespace 0, index=6 krfil=1 prev_file=0
------------记录了数据文件号、文件名称、块尺寸、状态、表空间、及其他信息。
unrecoverable scn: 0x0000.00000000 07/18/2006 13:14:42
Checkpoint cnt:319 scn: 0x0000.0031e018 07/26/2006 10:59:39
Stop scn: 0xffff.ffffffff 07/26/2006 10:59:33
------------online数据文件,其stop scn为无穷大的值。
Creation Checkpointed at scn: 0x0000.0000000b 05/12/2002 16:17:58
-----------创建的时间和scn,这个对于恢复丢失后的文件,可以使用alter database create datafile '' as '' reuse;来恢复,保证知道这样创建的文件需要哪些日志文件。
thread:0 rba 0x0.0.0)
enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
Offline scn: 0x0000.0031e016 prev_range: 0
Online Checkpointed at scn: 0x0000.0031e017 07/26/2006 10:59:33
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
.....
以前也研究过,但看的时候也不是理解的很清晰。
希望大家多讨论释疑。 |
|