Oracle® Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Part Number B14191-02 |
|
|
View PDF |
To take maximum advantage of the flash recovery area, it should be used to store and manage as many different types of file as possible: online redo logs, archived redo logs, control files and RMAN's own working files for backup and restore operations.
This section contains the following topics:
Configuring Online Redo Log Creation in the Flash Recovery Area
Configuring Control File Creation in the Flash Recovery Area
The following statements can create online redo logs in the flash recovery area:
CREATE DATABASE
ALTER DATABASE ADD LOGFILE
ALTER DATABASE ADD STANDBY LOGFILE
ALTER DATABASE OPEN RESETLOGS
The default size of an online log created in the flash recovery area is 100 MB. The log member filenames are automatically generated by the database.
The initialization parameters that determine where online redo log files are created are DB_CREATE_ONLINE_LOG_DEST_
n
, DB_RECOVERY_FILE_DEST
and DB_CREATE_FILE_DEST
. Details of the effect of various combinations of these parameters on online redo log creation can be found inOracle Database SQL Reference in the description of the LOGFILE
clause of the CREATE
DATABASE
statement.
The initialization parameters CONTROL_FILES
, DB_CREATE_ONLINE_LOG_DEST_
n
, DB_RECOVERY_FILE_DEST
, and DB_CREATE_FILE_DEST
all interact to determine the location where the database control files are created.
For a full description of how these parameters interact, see the "Semantics" section of the description of CREATE CONTROLFILE
in Oracle Database SQL Reference.
If the database creates an Oracle managed control file, and if the database uses a server parameter file, then the database sets the CONTROL_FILES
initialization parameter in the server parameter file. If the database uses a client-side initialization parameter file, then you must set the CONTROL_FILES
initialization parameter manually in the initialization parameter file.
It is recommended that you the use flash recovery area as an archived log location because the archived logs are automatically managed by the database. Whatever archiving scheme you choose, it is always advisable to create multiple copies of archived logs.
You have the following basic options, listed from most to least recommended:
Enable archiving to the flash recovery area only and use disk mirroring to create the redundancy needed to protect the archived redo logs.
Enable archiving to the flash recovery area and set other LOG_ARCHIVE_DEST_
n
initialization parameter to locations outside the flash recovery area.
Set LOG_ARCHIVE_DEST_
n
initialization parameters to archive only to non-flash recovery area locations.
If you want to use the flash recovery area, you cannot use the LOG_ARCHIVE_DEST
and LOG_ARCHIVE_DUPLEX_DEST
initialization parameters. You must use instead the LOG_ARCHIVE_DEST_
n
parameters, which have somewhat different semantics. Once your database is using LOG_ARCHIVE_DEST_
n
, you can configure a flash recovery area.
The interactions among different initialization parameters affecting redo log archiving desintations are as follows:
If LOG_ARCHIVE_DEST
(and, optionally, LOG_ARCHIVE_DUPLEX_DEST
) is set, these parameters will specify the only redo log archiving destinations.
If DB_RECOVERY_FILE_DEST
is specified (that is, if a flash recovery area is configured) and no LOG_ARCHIVE_DEST_
n
is specified, then LOG_ARCHIVE_DEST_10
is implicitly set to the flash recovery area. (You can override this behavior by explicitly setting LOG_ARCHIVE_DEST_10
to an empty string.)
If you set any local destinations for LOG_ARCHIVE_DEST_
n
, then archived redo logs are stored only in the destinations you specify using those parameters. In this case, redo log files are not archived in the flash recovery area by default. If you have a flash recovery area configured, you can explicitly add the flash recovery area to the set of archiving destinations by setting one of the LOG_ARCHIVE_DEST_
n
parameters to LOCATION=USE_DB_RECOVERY_FILE_DEST
(note that this does not have to be LOG_ARCHIVE_DEST_10
).
If you do not set any value for LOG_ARCHIVE_DEST
, LOG_ARCHIVE_DEST_
n
, or DB_RECOVERY_FILE_DEST
, then the redo logs are archived to a default location that is platform-specific. On Solaris, for example, the default is ?/dbs.
This section describes RMAN commands or implicit actions (such as control file autobackup) that can create files in the flash recovery area, and how to control whether a specific command creates files there or in some other destination. The assumption in all cases is that a flash recovery area has already been configured for your database. The commands are:
BACKUP
Do not specify a FORMAT
option to the BACKUP
command, and do not configure a FORMAT
option for disk backups. In such a case, RMAN creates backup pieces and image copies in the flash recovery area, with names in Oracle Managed Files name format.
Control File Autobackup
RMAN can create control file autobackups in the flash recovery area. Use the RMAN command CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR
to clear any configured format option for the control file autobackup location on disk. Control file autobackups will be placed in the flash recovery area when no other destination is configured.
RESTORE ARCHIVELOG
Explicitly or implicitly (as in the case of ), set one of the LOG_ARCHIVE_DEST_n
) parameters to 'LOCATION=USE_DB_RECOVERY_FILE_DEST
'. If you do not specify SET ARCHIVELOG DESTINATION to override this behavior, then restored archived redo log files will be stored in the flash recovery area.
RECOVER DATABASE
or TABLESPACE
, BLOCKRECOVER
, and FLASHBACK DATABASE
These commands restore archived redo logs from backup for use during media recovery, as required by the command. RMAN restores any redo log files needed during these operations to the flash recovery area, and delete them once they are applied during media recovery.
To direct the restored archived redo logs to the flash recovery area, set one of the LOG_ARCHIVE_DEST_
n
parameters to 'LOCATION=USE_DB_RECOVERY_FILE_DEST
", and make sure you are not using SET ARCHIVELOG DESTINATION
to direct restored archived logs to some other destination.