Databases Reference
In-Depth Information
If you enable an FRA (and don't set
LOG_ARCHIVE_DEST_N
), then, by default, the archive redo logs are written to a
directory in the FRA. The default file name format of the of archive redo log files created in the FRA is an OMF format.
The files are stored in a subdirectory given the same name as the database's unique name; for example,
/<fra>/<dbuname>/archivelog/<YYYY_MM_DD>/o1_mf_1_1078_68dx5dyj_.arc
Oracle recommends using an FRA. I prefer not to use an FRA because I don't like to be surprised with a hung
database when there are issues with the FRA's filling up and not being purged of old files quickly enough. Instead,
I use the
LOG_ARCHIVE_DEST_N
parameter to set the location of the archive redo log files. Here is an example:
log_archive_dest_1='LOCATION=/oraarch1/CHNPRD'
I also prefer to use this format for the default archivelog file name:
log_archive_format='%t_%s_%r.arc'
Sometimes, DBAs use
.dbf
as an extension for both data files and archive redo log files. I prefer to use
.arc
for
the archive redo log files. The
.arc
extension avoids the potentially confusing task of identifying a file as an archive
redo log file or a live database data file.
Configuring the RMAN Backup Location and File Format
When you run a
BACKUP
command for disk-based backups, RMAN creates backup pieces in one of the following locations:
•
Default location
•
FRA
BACKUP...FORMAT
command
•
Location specified via the
CONFIGURE CHANNEL...FORMAT
command
•
Location specified via the
Of these choices, I lean toward the last of them; I prefer specifying a target location via a backup channel.
Default Location
If you don't configure any RMAN variables and don't set up an FRA, by default RMAN allocates one disk-based
channel and writes the backup files to a default location. For example, you can run the following command without
configuring any RMAN parameters:
RMAN> backup database;
The default location varies by OS. In many Linux/Unix environments the default location is
ORACLE_HOME/dbs
.
The default format of the name of the backup files created is an OMF format; for example,
<ORACLE_HOME>/dbs/01ln9g7e_1_1
■
The default location is okay for small development databases. however, for most other environments (especially
production), you'll need to plan ahead for how much disk space you'll need for backups and explicitly set the location
for the backups via one of the other methods (such as implementing an fRA or
CONFIGURE CHANNEL
).
Tip