Control files hold the information about the redo logs and datafiles and the critical recovery information like online SCN and offline SCN of datafiles. While opening the database, the control file information is verified against the datafile header information, and the database is opened if both are in sync. Otherwise it will prompt for media recovery.
Control file dumps are usually taken to diagnose recovery- related problems. Part of the control file contents are visible in a few X$ views, such as those starting with X$KCC.
Following methods show how to dump the control file information.
In the following ALTER SESSION command, control file contents are dumped using level 10.
alter session set events 'immediate trace name controlf level 10';
In the following oradebug commands the control file contents are dumped using level 10.
oradebug setmypid
oradebug unlimit
oradebug dump controlf 10
The level controls how many records are to be dumped to the trace file. The number of records for the RMAN backups in the control files depend on the init.ora parameter CONTROL_FILE_RECORD_KEEP_TIME, which defaults to seven days. This parameter is related to RMAN when the control file is used as a recovery catalog. Setting this to higher values may increase the size of the control file, depending on the number of log switches and other recovery-related information stored in the file. The number of dumped records is 2^(level - 2 ), as shown here:
Level 10 Dumps (2^8) or 256 records
Level 11 Dumps (2^9) or 512 records
Level 12 Dumps (2^10) or 1024 records