To back up the database while it is open, or to be able 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
mode. You can determine if archiving of redo logs is enabled for the target database using the following query:
SELECT LOG_MODE FROM V$DATABASE;
If you do not specify a destination to which the database should write archived log files, the database writes them to the fast recovery area. You can specify a different destination, or you can specify that multiple copies of each archived log file be written, each to a different destination. Redundant copies help ensure that archived log files are always available in the event of a failure at one of the destinations.
The following procedure assumes that you want to place archived log files in the directory /u02/oracle/logfiles
, and redundant copies of archived log file in the directory /u03/oracle/logfiles
. The redundant copies are optional.
WARNING:
You must ensure that there is sufficient disk space at all times for archived log file destinations. If the database encounters a disk full error as it attempts to archive a log file, a fatal error occurs and the database stops responding. You can check the alert log for a disk full message.
To enable archiving of redo log files:
Note:
You cannot use backups from before the switch to ARCHIVELOG
mode to restore and recover the database to a point in time after the switch. Thus, if you do not immediately make a backup after switching, then you are running your database without a valid backup. See "Performing and Scheduling Backups Using RMAN" to learn how to make database backups.
See Also:
Oracle Database Administrator's Guide for more information about setting initialization parameters for archived log file destinations
"Monitoring General Database State and Workload" for information about the alert log