Oracle control file

Source: Internet
Author: User

A control file is a small binary file that is part of the Oracle database. It is used to record the database status and physical structure.
Each database must have at least one control file, but it is strongly recommended that more than one control file be created. The backup of each control file should be stored on different disks.

1. The control file contains the following information:
1: Database Name
2: database creation Timestamp
3: data file name and location
4: redo log (online redo log file) name and location
5: Serial number of the Current Log
6: checkpoint Information
7: Recent RMAN backup (I don't know what this is ?)

2. Search control file information in three ways

1: query the control file information in the v $ controlfile table.

SQL> select status, name from v $ controlfile;

STATUS NAME
---------------------------------------------------------
D: \ APP \ TOPWQP \ ORADATA \ ORCL \ CONTROL01.CTL
D: \ APP \ TOPWQP \ ORADATA \ ORCL \ CONTROL02.CTL
D: \ APP \ TOPWQP \ ORADATA \ ORCL \ CONTROL03.CTL

2: You can use the control_files parameter to find the control file.
 
As previously mentioned, the control file information is defined in the startup parameter file spfile or pfile, so you can view this parameter to find the control file:

SQL> show parameter control_files;

NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_files string D: \ APP \ TOPWQP \ ORADATA \ ORCL \ CON
TROL01.CTL, D: \ APP \ TOPWQP \ ORAD
ATA \ ORCL \ CONTROL02.CTL, D: \ APP
\ TOPWQP \ ORADATA \ ORCL \ CONTROL03
. CTL

3: run the following command to search for a file in the operating system:

D: \> dir/s control *. ctl
The volume in drive D is soft
The serial number of the volume is 000B-1FAE.

D: \ app \ topwqp \ oradata \ orcl directory

9,781,248 CONTROL01.CTL
9,781,248 CONTROL02.CTL
9,781,248 CONTROL03.CTL
3 files in 29,343,744 bytes

V $ CONTROLFILE_RECORD_SECTION lists the information in control_file.

You can modify the location of the control file in the following ways:

Alter system set control_files = 'file path/filename'
Scope = spfile

Scope = spfile indicates modifying the file address of control_file in spfile.

Note:

  • When oracle is started, it reads the startup initialization information,
  • The initialization information contains the location of the control file.
  • The control file contains the location of online redo log files and data files.

The size of these three control files is the same. It is best to place the three control files on different physical disks and write information to the control files concurrently, therefore, the content of the three control files is the same, but only the first one is read. If one of the three control files fails, oracle cannot be started.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.