oracle控制文件转储说明

#环境
os:centos 6.6 x64
db version:11.2.0.4.0

#转储控制文件

[oracle@ct6605 trace]$ sqlplus / as sysdba
#可以使用alter session set events 'immediate trace name controlf level 2';或oradebug dump controlf 2

SQL> oradebug setmypid
SQL> oradebug dump controlf 2;

#显示控制文件的转储内容
[oracle@ct6605 ~]$ cd /u01/app/oracle/diag/rdbms/ct66/ct66/trace
#可以通过上面sqlplus中的spid或ll -rth排序来确定是那个文件
[oracle@ct6605 trace]$ vi ct66_ora_12060.trc
#以下只显示控制文件的dump内容

*** 2016-02-19 17:55:46.970
Processing Oradebug command 'dump controlf 2'
DUMP OF CONTROL FILES, Seq # 13242 = 0x33ba

#通用文件头
 #第一个数据库文件(control,redo,archive,data,temp file)都有相同的文件头.也可能通过x$kcvfh或x$kcvfhall查看.
 V10 STYLE FILE HEADER:
        Compatibility Vsn = 186647552=0xb200400
        #db id,db name
        Db ID=665652355=0x27ad0c83, Db Name='CT66'
        Activation ID=0=0x0
        #Control Seq是记录控制文件最后一次更新的顺序号,用以和控制文件中这个顺序号做对比来确定控制文件的新旧.
        #File size是记录在缓存层的当前文件的大小,单位是块,单位块大小是16384
        Control Seq=13242=0x33ba, File size=604=0x25c
        #File Number此日志文件的绝对文件号.
        #Blksiz此日志文件的块大小.
        #File Type文件类型:
            KCCTYPCF 1 control file
            KCCTYPRL 2 redo log file
            KCCTYPDF 3 vanilla db file; that is,normal data, index, and undo blocks
            KCCTYPBC 4 backup control file
            KCCTYPBP 5 backup piece
            KCCTYPTF 6 temporary db file
        File Number=0, Blksiz=16384, File Type=1 CONTROL

***************************************************************************
DATABASE ENTRY 数据库标识
***************************************************************************
 (size = 316, compat size = 316, section max = 1, section in-use = 1,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 1, numrecs = 1)
 12/31/2015 17:40:19
 #DB Name数据库名称
 DB Name "CT66"
 #Database flags
    KCCDIMRE 0x00000001 whether media recovery enabled(that is: ARCHIVELOG mode)
    KCCDICKD 0x00000002 if dictionary must be checked with control file
    KCCDIRLR 0x00000004 DB OPEN RESETLOGS required
    KCCDIJNK 0x00000008 (junk value from beta)
    KCCDIMRC 0x00000010 was/is last mounted READ_COMPATIBLE
    KCCDICNV 0x00000020 controlfile was just created by convert from v6
    KCCDIIRA 0x00000040 Incomplete Recovery Allowed when resetting logs
    KCCDICCF 0x00000100 Controlfile was created with CREATE CONTROLFILE
    KCCDIINV 0x00000200 Invalid control file or database; still creating
    KCCDISBD 0x00000400 StandBy Database; control file for hot standby
    KCCDIORL 0x00000800 Opened ResetLogs; set until dictionary check
    KCCDICFC 0x00001000 valid ControlFile Checkpoint in backup cf
    KCCDISSN 0x00002000 SnapShot controlfile fileName pointer valid
    KCCDIUCD 0x00004000 lazy file header Update Checkpoint cycle Done
    KCCDICLO 0x00008000 clone database
    KCCDINDL 0x00010000 standby database No Data Loss
    KCCDISPK 0x00020000 Supplemental log primary keys
    KCCDISUI 0x00040000 Supplemental log unique indexes
    KCCDISFK 0x00080000 Supplemental log foreign keys
    KCCDIGDA 0x00100000 Database guard all
    KCCDIGDS 0x00200000 Database guard standby data
    KCCDIIMR 0x00400000 Group Membership Recovery is supported
    KCCDIEAR 0x00800000 End-of-redo Archival Received
    KCCDISTR 0x01000000 Standby Terminal Recovery
    KCCDILSB 0x02000000 Logical StandBy database
 Database flags = 0x00404001 0x00001200
 #Controlfile Creation Timestamp控制文件建立时间
 Controlfile Creation Timestamp  12/31/2015 17:40:19
 #Incmplt recovery scn在不完全恢复时最后应用的scn,数据库打开后会清空
 Incmplt recovery scn: 0x0000.00000000
 #Resetlogs scn是resetlogs的唯一标识,用以在数据库打开时同数据文件和日志文件比对
 Resetlogs scn: 0x0000.000e2006 Resetlogs Timestamp  12/31/2015 17:40:19
 #Prior resetlogs scn是上一次resetlogs的唯一标识
 Prior resetlogs scn: 0x0000.00000001 Prior resetlogs Timestamp  08/24/2013 11:37:30
 Redo Version: compatible=0xb200400
 #Data files = 7, #Online files = 7
 #Database checkpoint scn是数据库scn,表示最近一次全量checkpoint操作时的scn,对应v$database.checkpoint_change#
 Database checkpoint: Thread=1 scn: 0x0000.001d1426
 #Enabled: the number of enabled threads
 #Open: the number of open threads
 #Head: head of thread link list
 #Tail: tail of thread link list
 Threads: #Enabled=1, #Open=1, Head=1, Tail=1
 enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
...
Max log members = 3, Max data members = 1
 Arch list: Head=3, Tail=3, Force scn: 0x0000.001c3a88scn: 0x0000.00000000
 Activation ID: 665633411
 SCN compatibility 1
 Auto-rollover enabled
 #Controlfile Checkpoint at SCN: It is updated after every checkpoint (may it betablespace, thread, or database) and is always greater than or equal to the database checkpoint when the database is open.
 Controlfile Checkpointed at scn:  0x0000.001d985e 02/19/2016 17:53:57
 thread:0 rba:(0x0.0.0)
 enabled  threads:  00000000 00000000 00000000 00000000 00000000 00000000
 ...

***************************************************************************
CHECKPOINT PROGRESS RECORDS
***************************************************************************
 (size = 8180, compat size = 8180, section max = 11, section in-use = 0,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 2, numrecs = 11)
#Thread是进程所属的线程号
#Status:
    KCCCP_UNKNOWN (0): does not contain valid information
    KCCCP_CLOSED (1): thread closed; no thread recovery needed
    KCCCP_OPEN (2): thread open; data can be used for recovery
#Dirty是dirty count在检查点队列中的长度
THREAD #1 - status:0x2 flags:0x0 dirty:10
#Low cache RBA: The low RBA of the checkpoint queues indicate where recovery can begin.
#On Disk RBA是当前系统最新rba
low cache rba:(0x75.f505.0) on disk rba:(0x75.f51b.0)
#On Disk SCN是当前系统最新rba所对应的scn,由ckpt进程3秒更新一次.crash recover至少要应用到此.对应x$kcccp.cpods
on disk scn: 0x0000.001d9872 02/19/2016 17:54:50
#Resetlogs SCN是最后一次resetlogs的scn
resetlogs scn: 0x0000.000e2006 12/31/2015 17:40:19
#Heartbeat: The heartbeat is incremented in CKPT's timeout action, provided that the thread is mounted.
heartbeat: 902915463 mount id: 668479460
...

***************************************************************************
EXTENDED DATABASE ENTRY
***************************************************************************
 (size = 900, compat size = 900, section max = 1, section in-use = 1,
  last-recid= 0, old-recno = 0, last-recno = 0)
 (extent = 1, blkno = 140, numrecs = 1)
Control AutoBackup date(dd/mm/yyyy)=31/12/2015
Next AutoBackup sequence= 0
Database recovery target inc#:2, Last open inc#:2
flg:0x0, flag:0x0
Change tracking state=0, file index=0, checkpoint count=0scn: 0x0000.00000000
Flashback log count=0, block count=0
Desired flashback log size=0 blocks
Oldest guarantee restore point=0
Highest thread enable/disable scn: 0x0000.00000000
Number of Open thread with finite next SCN in last log: 0
Number of half-enabled redo threads: 0
Sum of absolute file numbers for files currently being moved online: 0

#oradebug dump controlf 3还包括以下信息
REDO THREAD RECORDS
LOG FILE RECORDS
DATA FILE RECORDS
TEMP FILE RECORDS
TABLESPACE RECORDS
RMAN CONFIGURATION RECORDS
FLASHBACK LOGFILE RECORDS
MTTR RECORDS
STANDBY DATABASE MAP RECORDS
RESTORE POINT RECORDS
ACM SERVICE RECORDS
LOG FILE HISTORY RECORDS 日志文件历史信息
OFFLINE RANGE RECORDS
ARCHIVED LOG RECORDS 归档日志信息
FOREIGN ARCHIVED LOG RECORDS
BACKUP SET RECORDS
BACKUP PIECE RECORDS
BACKUP DATAFILE RECORDS
BACKUP LOG RECORDS
DATAFILE COPY RECORDS
BACKUP DATAFILE CORRUPTION RECORDS
DATAFILE COPY CORRUPTION RECORDS
DELETION RECORDS
PROXY COPY RECORDS
INCARNATION RECORDS
RMAN STATUS RECORDS
DATAFILE HISTORY RECORDS
NORMAL RESTORE POINT RECORDS
DATABASE BLOCK CORRUPTION RECORDS
 
 

请使用浏览器的分享功能分享到微信等