Database Reference
In-Depth Information
08/02/2013 03:24 PM 10,174,464 BACKUP_CONTROL.CTL
1 File(s) 10,174,464 bytes
0 Dir(s) 9,930,571,776 bytes free
We will cover recovering from control-file loss using a backup control file in Chapter 2.
Creating a Trace File with the Create CONTROLFILE
Command in It
If all else fails and you do not have a backup control file, don't worry; you have another
option, the CREATE CONTROLFILE command. Normally, manually executing the command
can be challenging because you need to know a lot of information about your database (like
the names and locations of all the database data files). However, you can prepare for the
possibility of having to use the CREATE CONTROLFILE command by creating one in advance.
The ALTER DATABASE BACKUP CONTROLFILE TO TRACE command will create a trace file with
the CREATE CONTROLFILE command in it for you. The trace file is stored in the new diagnos-
tic directory structure in Oracle Database 12 c .
The diagnostic directory structure is a new standard introduced in Oracle Database 12 c
that defines where Oracle stores files related to database troubleshooting and diagnostics.
The base directory of this structure is defined by the parameter DIAGNOSTIC_DEST . Here is
an example of the setting of DIAGNOSTIC_DEST on an Oracle Database:
SQL> show parameter diag
NAME TYPE VALUE
------------------------------------ ----------- ---------
diagnostic_dest string C:\ORACLE
A whole topic could be written on the new 12 c diagnostic capabilities, but what we are
interested in is where user-generated trace files get created because when we issue the ALTER
DATABASE BACKUP CONTROLFILE TO TRACE command, the resulting file will be a user-generated
trace file.
We would be remiss if we didn't mention that the database alert log is con-
tained in the diagnostic destination directory structure. It is contained in
the same directory as the trace files we are discussing in this section. Each
database (or database instance if you are running RAC) will have its own
alert log. The filename format for the alert log is alert_{instance name}
.log . The alert log is an important diagnostic and monitoring tool, so you
should become familiar with it.
In this case, the trace file will be created in a directory structure under DIAGNOSTIC_
DEST\diag\rdbms\orcl\orcl\trace , as shown in this code example:
SQL> alter database backup controlfile to trace;
Database altered.
Search WWH ::




Custom Search