Oracle control file learning Summary

Source: Internet
Author: User


1. What is an oracle control file?

Record the physical structure of the database, which is an essential binary file for Oracle loading or recovery.

What is a control file?

2. Information in the Oracle Control File

Control File Content
Database Name, ID, and creation Timestamp
Tablespace name
Online log file, data file location, number, name
Sequence Number of online logs
Checkpoint Information
Start or end of the withdrawal segment
Archive information
Backup Information

3. View control files in the database

1) view the path of the control file in the operating system

There are four methods

Select * from V $ controlfile -- list the names and status information of all control files in the instance select * from V $ parameter -- list the positions and status information of all parameters select * from V $ controlfile_record_section -- list part of the information recorded in the control file

SQL> show parameter control_files name type value types ------------- using control_files string/usr/oradata/easdb/control01.ctl,/usr/oradata/easdb/control02.ctl, /usr/oradata/easdb/control03.ctl

2) use the strings command to view the specific content in the control file

SQL> host strings /usr/oradata/easDB/EASDB/control01.ctl | more

Method 2: Back up the control file to a flat file (then view the specific content in the control file)

SQL> host strings /usr/oradata/easDB/EASDB/control01.ctl > /usr/oradata/easDB/EASDB/ctl01.txt

4. Oracle Control File Management and Maintenance

1) planning rules

We recommend that you store data on different disks or partitions of the same disk.

2) modify the number of control files

SQL> alter system set control_files = '/usr/oradata/easDB/EASDB/control01.ctl' scope = spfile;

3) backup of Control Files

Hot Standby:

SQL> alter Database Backup controlfile to '<dir>'; -- hot backup control file SQL> alter Database Backup controlfile to trace as '<dir>'; -- Obtain the script for creating the control file.

RMAN:

RMAN> connect target/; RMAN> Backup current controlfile; RMAN> backup database include current controlfile; -- or set RMAN to automatic backup RMAN> Configure controlfile autobackup on; -- View RMAN> show all;

4) copy the control file

SQL> ho cp /usr/oradata/easDB/EASDB/control01.ctl /usr/oradata/easDB/EASDB/control02.ctl

5) recreate the control file

-- There are three main considerations for recreating the control file:

-- Find out the size and location of each log file

-- Locate the location of each data file

-- Set the correct Character Set

6) restore control files

Use bkp files

RMAN> restore controlfile from '/usr/oradata/easDB/EASDB/control01.BKP';

You can directly overwrite the control files created using scripts.

Appendix: The documents referenced in this document are as follows:

Http://blog.csdn.net/robinson_0612/article/details/5737527

Http://space.itpub.net/25989950/viewspace-712228

Http://space.itpub.net/295691/viewspace-217971

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.