To back up thc databasc whilc it is open, or to be ablc to perform complete or point-in-time media recovery, you must enable the archiving of redo log files. To do so, you place the database in ARCHIVELOG modę. You can determine if archiving of redo logs is enablcd for thc target databasc using the following query:
SELECT LOG_MODE FROM V$DATABASE;
If you do not spccify a destination to which the databasc should writc archivcd log files, thc databasc writes thcm to the fast rccovery arca. You can spccify a different destination, or you can spccify that multiplc copies of each archived log file be written, each to a different destination. Rcdundant copies help ensure that archived log files are always available in the event of a failure at one of the destinations.
The following procedurę assumes that you want to place archived log files in the directory /u02/oracle/logfiles, and rcdundant copies of archived log file in the directory /u03/oracle/logfiles. The rcdundant copies are optional.
To enable arełming of redo log files:
1. Connect RMAN to the target database as described in "Connecting to the Target Database" on page 9-9.
2. Shut down the database.
SHUTDOWN IMMEDIATE;
3. Back up the database.
It is recommended that you always back up a database before making any major change to the database.
Sec "Performing a Whole Database Backup" on page 9-18.
4. Start the instancc and mount thc databasc (do not open thc database). To enable archiving, the database must be mounted but not open.
STARTUP MOUNT;
5. Enter the following command to set the first archivcd log filc destination:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_l =
* LOCATION=/u02/oracle/logfileśł;
See Also:
■"Fast Recovery Area" on page 9-5
■"About the Fast Recovery Area Size" on page 9-7
WARNING: You must ensure that there is suffieient disk space at
all times for arełmed log file destinations. If the datahase
encounters a disk fuli error as it attenipts to archive a log file, a fatal
error occurs and the database stops responding. You can check the
alert log for a disk fuli message.