Thursday, October 6, 2011

CONTROL FILES

  1. ContainsDatabase Name and Database Unique Identifier (DBID)locations of:
  2. Feature: Maintains database Integrity by using: 
    1. SCN (Sequence Numbers)

      b.      Timestamps

                                                         i.      Online Redo Log Files

                                                       ii.      Datafiles

                                                      iii.      Archive Log Files (i.e if the database is in Archive Log Mode)

c.       Time Stamp of Database Database Creation

d.      Details of RMAN backup (i.e. if RMAN utility is being used for backing up)



2.      Feature: Maintains database Integrity by using:

a.       SCN (Sequence Numbers)

b.      Timestamps

3.      Purpose of Control File:

a.       Control File is required to open the database as it contains the structure of the database (i.e data files, control files).

b.      Tracks the structural changes to the database (such as adding/removing/modifying a datafile).

c.       Contains metadata which is required for Instance Recovery when the database is not open.

4.      One Control File per database

5.      Multiple copies maintained by multiplexing the Control File

6.      Multiple copies are synchronized automatically

7.      Minimum number of copies: 1

8.      Maximum number of copies: 8

9.      Damage to any control file will terminate the Instance.

10.  DATA DICTIONARY VIEWS OF CONTROL FILE:



V$DATABASE
 Displays database information from control file

V$CONTROLFILE
 Location and Status of each Control File in the database

V4CONTROLFILE_RECORD SECTION
 

CONTROL_FILES PARAMETER
 SQL> show parameter control_files

Lists all the control files being specified in




a.       v$database:  Displays database information from Control File

b.      v$controlfile





11.  Creating control file:The create control file statement is used in the create database statement during the database creating itself. The create control file statement is as follows

CONTROL_FILES = (/u01/app/oracle/product/control01.ctl,                 /u02/app/oracle/product/control02.ctl,                  /u03/app/oracle/product/control03.ctl)


Recommendation: Control files if created on separate mount points as indicated above (i.e /u01, u02, u03) will ease the recovery if one of the mount points hang.



12.  Control File notes all checkpoint information from online Redo Log Files

13.  During recovery, the recovery process first reads the SCN number from the control file. The recovery process then starts by writing all information from online Redo log files from that SCN to the datafiles.

 

No comments: