1.获取控制文件中全部记录的相关信息
select type,record_size,records_total,records_used from v$controlfile_record_section;
TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED
---------------------------- ----------- ------------- ------------
DATABASE 316 1 1
CKPT PROGRESS 8180 11 0
REDO THREAD 256 8 1
REDO LOG 72 16 3
DATAFILE 428 100 5
FILENAME 524 2298 9
TABLESPACE 68 100 6
TEMPORARY FILENAME 56 100 1
.....
record_size:每个记录的字节数
records_total:该段分配的记录个数
records_used:该段所使用的记录个数
2.
SQL> select type,record_size,records_total,records_used from
2 v$controlfile_record_section
3 where type in('DATAFILE','TABLESPACE','REDO LOG');
TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED
---------------------------- ----------- ------------- ------------
REDO LOG 72 16 3
DATAFILE 428 100 5
TABLESPACE 68 100 6
3.怎样查看控制文件的路径?
SQL> select value from v$parameter where name='control_files';
VALUE
--------------------------------------------------------------------------------
/oradata/law/law/control01.ctl, /oradata/law/law/control02.ctl, /oradata/law/law
/control03.ctl
SQL> select * from v$controlfile
2 ;
STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- ------------------------- --- ---------- --------------
/oradata/law/law/control0 NO 16384 430
1.ctl
/oradata/law/law/control0 NO 16384 430
2.ctl
/oradata/law/law/control0 NO 16384 430
3.ctl