What is Oracle database Control file ?




The control file is a binary file that contains important database information, such as the location of the database datafiles and database instance


Oracle control file 

The control files of a database store the status of the physical structure of the database. The control file is the most important for database operation. It contains the following types of information:
  • Database information (RESETLOGS SCN and their time stamp)
  • Archive log history
  • Tablespace and datafiles records (filenames, datafile checkpoints, read/write status, offline or not)
  • Redo threads (current online redo log)
  • Database's creation date
  • database name
  • current archive log mode
  • Log records (sequence numbers, SCN range in each log)
  • RMAN catalog
  • Database block corruption information
  • Database ID, which is unique to each DB
The location of the control files is specified through the control_files init param.

The control file tells oracle how to read and load data. the control file tell sql*loader  where To find the source data for load  and the tables into which to load the data, along with any other
Rules that must be applied during the load processing. these rules can include restrictions for
Discards(similar to where clause)  and instructions for combining multiple physical  rows  in an
Input file into a single row during an insert .


Backing up Controlfiles
When a controlfile becomes unavailable, the database cannot continue to operate.
Because control files keep track of datafiles the control file should be backed up whenever a change is made to the database .
The command to back the control file up is: alter database backup controlfile to 'filename'.
Recovering database when controlfile is lost
If the controlfile is lost, it is somewhat difficult to do a recovery because the database cannot be mounted for a recovery. The controlfile must be recreated .
In order to recover from a lost spfile, the DBID is required. 

Size of control files
The size of the control files is governed by the following parameters:
  • maxlogfiles
  • maxlogmembers
  • maxloghistory
  • maxinstances
  • control_file_record_keep_time
Sections
The controlfile contains the following sections:
  • ARCHIVED LOG (reusable)
  • BACKUP CORRUPTION (reusable)
  • BACKUP DATAFILE (reusable)
  • BACKUP PIECE (reusable)
  • BACKUP REDOLOG (reusable)
  • BACKUP SET (reusable)
  • BACKUP SPFILE
  • CKPT PROGRESS
  • COPY CORRUPTION (reusable)
  • DATABASE
  • DATAFILE
  • DATAFILE COPY (reusable)
  • DATAFILE HISTORY
  • DATABASE INCARNATION
  • DELETED OBJECT (reusable)
  • FILENAME
  • FLASHBACK LOG
  • INSTANCE SPACE RESERVATION
  • LOG HISTORY (reusable)
  • MTTR
  • OFFLINE RANGE (reusable)
  • RECOVERY DESTINATION
  • REMOVABLE RECOVERY FILES
  • RMAN STATUS
  • RMAN CONFIGURATION
  • REDO THREAD
  • REDO LOG
  • TABLESPACE
  • TEMPORARY FILENAME
  • THREAD INSTANCE NAME MAPPING
  • PROXY COPY
The minimum number of days that a reusable record is kept in the controlfile is controlled by the control_file_record_keep_time parameter. 


Share your views...

0 Respones to "What is Oracle database Control file ?"

Post a Comment

 

© 2010 Codes & Concepts All Rights Reserved Thesis WordPress Theme Converted into Blogger Template by Hack Tutors.info