Manage Oracle Control File

zhaozj2021-02-16  101

Each Oracle database has a control file. The control file is a small binary file that can record the physical structure of the database, including the following content: Database name, related data file, and online redo log file name and location, time standard created by the database, the current log serial number, inspection Click information.

Whenever you open a database, the control file must be able to write content from the Oracle database server. Without control files, the database cannot be loaded and it is difficult to recover. Oracle Database Control Files are created simultaneously in the database.

Using the initialization parameters in the database initialization parameter file You can specify the control file name, you can view the value of Control_Files via the SELECT * from V $ Parameter where name = 'control_files' statement. The database instance startup process will identify and open all listed files.

Each Oracle database should have at least two control files, which are stored on different disks, respectively. If the control file is damaged due to the failure of the disk, then the relevant instance must be closed. Once the disk drive is repaired, you can use another disk to save a well-controlled file or the copy to restore damaged control files, which will restart the database instance.

You can create a new control file by using the SQL command. The command format is as follows: CREATE CONTROLLE, please refer to the relevant information in the detailed command format.

Backup control file. With the ALTER DATABASE Backup ControlFile statement, you can back up the control file, there are two ways to select: 1. Use the following statement to back up the control file to binary to 'oracle / backup / control.bkp'. 2, after the production, you can use to recreate the SQL statement for the control file: ALTER DATABASE Backup ControlFile to TRACE. This command writes the SQL script to the database trace file, you can find this SQL script in this trace file and edit the script to generate a new control file.

Delete the control file. Steps: 1. Turn off the database. 2. Edit the initialization parameter control_files in the database initialization parameter file to delete the old control file name. 3. Restart the database instance.

The following database view displays information about the control file. V $ controlfile lists the name of the control file V $ controlfile_record_section Displays information about the control file record segment V $ Parameter Display Initialization Parameters Control_Files Specified Control File Name

转载请注明原文地址:https://www.9cbs.com/read-10409.html

New Post(0)