In Oracle databases, the Database Control File maintains the global physical structure of the database to support successful database startup and operation. When creating a database, the corresponding database control file is also provided. During database usage, Oracle constantly updates the Database Control file. Therefore, as long as the database is opened, the Database Control file must be in writable state. If, for some reason, the control file cannot be accessed, the database will not work properly.
Each control file can be associated with only one Oracle database. The Database Control file contains the information about the database required to access the database when the database instance starts and operates normally. The content of the database control file can only be modified by Oralce, and neither the database administrator nor the user can edit it.
The control file contains the following information:
Database Name
Timestamp of database creation
Related data files, names and locations of repeat log files
Tablespace Information
Offline scope of data files
Log history
Archive log information
Backup group and block information
Back up data files and repeat log information
Data file copy information
Number of current log Sequences
Checkpoint Information
The Database Name and timestamp are derived from the Database name when the Database is created, the Database name from the DB_NAME initialization slave parameter, or the name used by the Cteate Database statement.
Whenever a data file or repeat log file is added, renamed, or deleted directly from the database, the control file must be updated to reflect changes in the physical structure. After these changes are recorded, Oracle can:
When the database is started, you can determine and open the data file and repeat the day file.
When the database must be restored, you can determine which files are required and available.
PS: if the physical structure of the Database is changed (the Alert Database statement is used), you should immediately back up the control file.
The control file also records information about checkpoints. Every 3 seconds, the checkpoint process (CKPT) records the checkpoint location information of the repeat log file in the control file. This information is used in the restoration process of the database, and tells the database that the replaying entries recorded earlier do not need to be restored because they have been written into the data file.
Because the control file is critical to the database, multiple copies are stored online. These files are generally stored on different disks to minimize potential risks caused by disk trials. Oracle supports concurrent opening and writing of multiple identical control files for the same database. By saving multiple control files for a database on different disks, You can minimize the single point of failure that may occur to control files. For example, if the disk containing a control file crashes and Oracle tries to access the damaged file, the current instance will fail, however, if the replica of the current control file is saved on different disks, You can restart an instance without the need to recover the database.
If all the control files of a database are lost during operation, the database instance will fail and media recover must be performed ). However, a backup of a slightly older control file must be used for media recovery, because the backup of the current control file is unavailable. To protect control files, you must pay attention to the following aspects:
Multiple replication control files must be used for each database;
Store the copies of each control file on different physical disks;
Use the image mechanism of the operating system;
Monitor backups.
Here is an introduction to the Database Control file of the physical storage structure of Oracle databases. I hope this introduction will bring you some benefits. Thank you!