Home arrow Oracle arrow Using Control Files for Backup and Recovery

Using Control Files for Backup and Recovery

In this second part of a three-part series on backing up and recovering an Oracle database, you'll learn about multiplexing control files and enabling ARCHIVELOG mode. This article is excerpted from chapter 30 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 9781590597705).

  1. Using Control Files for Backup and Recovery
  2. Enabling ARCHIVELOG Mode
By: Apress Publishing
Rating: starstarstarstarstar / 1
June 02, 2011

print this article



Multiplexing Control Files

As you may remember from Chapter 28, the control file maintains the metadata for the physical structure of the entire database. It stores the name of the database, the names and locations of the tablespaces in the database, the locations of the redo log files, information about the last backup of each tablespace in the database, and much more. It may be one of the smallest yet most critical files in the database. If you have two or more multiplexed copies of the control file and you lose one, it is a very straightforward recovery process. However, if you have only one copy and you lose it due to corruption or hardware failure, the recovery procedure becomes very advanced and time consuming.

By default, Oracle Database XE creates only one copy of the control file. To multiplex the control file, you need to follow a few simple steps. First, identify the location of the existing control file using the Home ➤ Administration ➤ About Database page, or use the following query:

select value from v$parameter
where name = 'control_files';

On Linux you will see something similar to the following:


The next step is to alter the SPFILE (see Chapter 28 for a discussion on types of parameter files) to add the location for the second control file. We will use the location/u01/app/oracle/controlfileto store the second copy of the control file. Here is the SQL statement you use to add the second location:

alter system set control_files =
'/usr/lib/oracle/xe/oradata/XE/ control.dbf',

Be sure to useSCOPE=SPFILEhere, as in the example, since you cannot dynamically change theCONTROL_FILESparameter while the database is open. Next, you must shut down the database as follows:

shutdown immediate

On Linux, you use your favorite GUI or operating system command line to make a copy of the first control file in the second location:

cp /usr/lib/oracle/xe/oradata/XE/control.dbf \

Finally, restart the database using this command at theSQL>prompt:


Checking the dynamic performance viewV$PARAMETERagain, you can see that there are now two copies of the control file:


As with the members of a redo log file group, any changes to the control file are made to all copies. As a result, the loss of one control file is as easy as shutting down the database (if it is not down already), copying the remaining copy of the control file to the second location, and restarting the database.

>>> More Oracle Articles          >>> More By Apress Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates


Dev Shed Tutorial Topics: