Database Reference
In-Depth Information
We hope you also realize that you will need to back up files like the data-
base parameter file, any other Oracle-related configuration files (such as
for networking), and the Oracle Database software itself. Backing up these
structures (except for the spfile, which is a special RMAN case we will
cover in Chapter 3) is beyond the scope of the OCP exam.
Backing Up the Control File
Finally, we need to talk about control-file backups. In Oracle there are three ways to manu-
ally back up a control file (again, RMAN methods will be covered in Chapter 3):
Backing up the original control file during a cold backup
Creating a backup control file
Creating a trace file with the CREATE CONTROL FILE command in it
We have already covered the first method in this chapter. Let's look at the remaining two
methods in some more detail. We will address recovering from a lost control file in Chapter 2.
Creating a Backup Control File
The backup control file is almost the same as a regular control file. It has some areas in it
that are marked such that Oracle recognizes that it's a backup control file. When a backup
control file is used, some form of recovery will be required (typically just involving the use
of the archived and online redo logs if the database is otherwise intact).
To create the backup control file, simply issue the ALTER DATABASE BACKUP CONTROLFILE
TO command, indicating at the end of the command where you want the control file to be
created.
For example, if you wanted to create a backup control file after the online backup you
performed in Exercise 1.4, you would simply need to issue the following command:
SQL> alter database backup controlfile to
'c:\backup\orcl\backup2\backup_control.ctl';
Database altered.
The result is the creation of a backup control file called backup_control.ctl found in
the c:\backup\orcl\backup2 directory, as you can see here:
SQL> host dir c:\backup\orcl\backup2\backup_control.ctl
Volume in drive C has no label.
Volume Serial Number is 08DE-E1AB
Directory of c:\backup\orcl\backup2
Search WWH ::




Custom Search