|Lesson 4|| The Control File |
|Objective||Identify the purpose and contents of the database control file. |
Oracle Database Control File
Information in the control file
Every Oracle database contains a control file
The control file gives Oracle a place to store important information about the physical state
of the database. It contains the following information:
The database name
Information about tablespaces
The names and locations of all the datafiles
The names and locations of all the redo log files
The current log sequence number
Information about redo logs and the current state of archiving
Main function of the control file
Perhaps the most significant use of the control file is to keep track of all the other files that make up the database.
When you start an instance and open a database, Oracle reads the initialization file to find the name and location of the control file.
Then it reads the control file to find the names and locations of all the datafiles and redo log files. Finally it opens all those files, making the database available for you to use.
Importance of the control file
The control file is so critical to the proper operation of an Oracle database that Oracle encourages you to keep at least three copies of the control file at all times.
These should be on separate disks, and preferably separate controllers .
That is why the initialization file that you saw in the last lesson listed three control file names. The Oracle database software always writes the same information to all control files,
thus keeping them in sync with one another.
Data Control Files
Before you move on to the next lesson, click the Exercise link below to test your knowledge of the control and initialization files.
Data Control Files
Every Oracle database has a control file. A control file contains entries that specify the
physical structure of the database. For example, it contains the following information:
- Database name
- Names and locations of datafiles and redo log files
- Time stamp of database creation
Oracle can multiplex the control file, that is, simultaneously maintain a number of identical control file copies, to protect against a failure involving the control file.
Every time an instance of an Oracle database is started, its control file identifies the database and redo log files that must be opened for database operation to proceed. If
the physical makeup of the database is altered (for example, if a new datafile or redo log file is created), then the control file is automatically modified by Oracle to reflect
the change. A control file is also used in database recovery.
Control Files The control files include information about the file structure of the database and the current log sequence number being written by LGWR. During
normal recovery procedures, the information in a control file guides the automatic progression of the recovery operation.