初学Oracle的朋友肯定对Controlfile控制文件中到底记录了何种的信息记录而感到好奇,实际上我们可以通过一个视图v$controlfile_record_section来了解控制文件的信息片段:
SQL> select type, record_size, records_total from v$controlfile_record_section; TYPE RECORD_SIZE RECORDS_TOTAL ---------------------------- ----------- ------------- DATABASE 316 1 CKPT PROGRESS 8180 35 REDO THREAD 256 32 REDO LOG 72 192 DATAFILE 520 1024 FILENAME 524 4674 TABLESPACE 68 1024 TEMPORARY FILENAME 56 1024 RMAN CONFIGURATION 1108 50 LOG HISTORY 56 292 OFFLINE RANGE 200 1063 ARCHIVED LOG 584 136 BACKUP SET 40 1227 BACKUP PIECE 736 1000 BACKUP DATAFILE 200 1063 BACKUP REDOLOG 76 430 DATAFILE COPY 736 1000 BACKUP CORRUPTION 44 1115 COPY CORRUPTION 40 1227 DELETED OBJECT 20 818 PROXY COPY 928 1004 BACKUP SPFILE 124 131 DATABASE INCARNATION 56 292 FLASHBACK LOG 84 2048 RECOVERY DESTINATION 180 1 INSTANCE SPACE RESERVATION 28 1055 REMOVABLE RECOVERY FILES 32 1000 RMAN STATUS 116 141 THREAD INSTANCE NAME MAPPING 80 32 MTTR 100 32 DATAFILE HISTORY 568 57 STANDBY DATABASE MATRIX 400 31 GUARANTEED RESTORE POINT 212 2048 RESTORE POINT 212 2083 DATABASE BLOCK CORRUPTION 80 8384 ACM OPERATION 104 64 FOREIGN ARCHIVED LOG 604 1002 v$controlfile_record_section 的数据实际来源于X$KCCRS内部表 v$controlfile_record_section 视图的定义 select inst_id, decode(indx, 0, 'DATABASE', 1, 'CKPT PROGRESS', 2, 'REDO THREAD', 3, 'REDO LOG', 4, 'DATAFILE', 5, 'FILENAME', 6, 'TABLESPACE', 7, 'TEMPORARY FILENAME', 8, 'RMAN CONFIGURATION', 9, 'LOG HISTORY', 10, 'OFFLINE RANGE', 11, 'ARCHIVED LOG', 12, 'BACKUP SET', 13, 'BACKUP PIECE', 14, 'BACKUP DATAFILE', 15, 'BACKUP REDOLOG', 16, 'DATAFILE COPY', 17, 'BACKUP CORRUPTION', 18, 'COPY CORRUPTION', 19, 'DELETED OBJECT', 20, 'PROXY COPY', 21, 'BACKUP SPFILE', 23, 'DATABASE INCARNATION', 24, 'FLASHBACK LOG', 25, 'RECOVERY DESTINATION', 26, 'INSTANCE SPACE RESERVATION', 27, 'REMOVABLE RECOVERY FILES', 28, 'RMAN STATUS', 29, 'THREAD INSTANCE NAME MAPPING', 30, 'MTTR', 31, 'DATAFILE HISTORY', 32, 'STANDBY DATABASE MATRIX', 33, 'GUARANTEED RESTORE POINT', 34, 'RESTORE POINT', 35, 'DATABASE BLOCK CORRUPTION', 36, 'ACM OPERATION', 37, 'FOREIGN ARCHIVED LOG', 'UNKNOWN'), rsrsz, rsnum, rsnus, rsiol, rsilw, rsrlw from x$kccrs where indx not in (22)下表罗列出了controlfile 控制文件可能出现的数据库各类文件的记录,如数据文件记录、文件名记录、表空间记录等:
31. Datafile History Record: (1 per dropped datafile)
本文转自maclean_007 51CTO博客,原文链接:
http://blog.51cto.com/maclean/1278172