Archiving Redo log   «Prev  Next»
Lesson 3 The archive log destination
ObjectiveSpecify the destination for archived log files.

Archive log Destination

With archivelog mode turned on, you need to make a copy of each log file before Oracle will reuse it. This process of copying the log files is referred to as archiving. Before you can archive a log file, you must specify the location in which the archived copies are to be placed. This location is known as the archive log destination.

Setting the Archive Log Destination

You can control the archive log destination using the log_archive_dest initialization parameter. You set this in your initialization parameter file, and the setting takes effect the next time the database is started. The following setting, for example, sets the archive log destination to a directory on the E: drive:
log_archive_dest = 'E:\ORADATA\COIN\ARCHIVE'

This parameter may also be modified while the database is open. For that, use the ALTER SYSTEM command, as shown here:

SET log_archive_dest = 'E:\ORADATA\COIN\ARCHIVE';

Once the destination is set, whenever a log file is archived (whether manually or automatically), Oracle will copy it to that location.

Setting Second Destination

For added security, you can define a second archive log destination. You might choose to do this if your drives are not mirrored. You define a second archive log destination using the log_archive_duplex_dest initialization parameter. If you define two destinations, Oracle makes an archive copy of each log file in both directories. By default, the duplex destination is optional. If a copy to that destination fails, Oracle will still continue to function. You can control whether or not the duplex destination is mandatory by using the log_archive_min_succeed_dest parameter. Here's an example:

log_archive_dest = 'E:\ORADATA\COIN\ARCHIVE'

log_archive_duplex_dest = 'H:\ORADATA\COIN\ARCHIVE'

log_archive_min_succeed_dest = 2

Here, two destinations have been defined, and the log_archive_min_succeed_dest parameter has been set to 2. If Oracle cannot archive a log file to both locations, then Oracle will stop until you fix the problem. If a value of 1 had been used, which is the default, Oracle would ignore failures when copying to the duplex destination.


Oracle8i changed the way that archive log destinations were specified.

Archive log destinations in Oracle8i

Oracle8i changes the way in which archive log destinations are specified. Instead of just two locations controlled by the log_archive_dest and log_archive_duplex_dest parameters, Oracle8i allows you to have up to five archive log destinations. These locations are specified using the parameters log_archive_dest_1 through log_archive_dest_5. The following syntax must be used:

log_archive_dest_n = '{SERVICE=service_name




The parameters are as follows:
  1. n: A number from 1 through 5.
  2. service_name: A Net8 service name.
  3. directory: A directory path.
  4. MANDATORY: The destination is a required destination.
  5. OPTIONAL: The destination is optional. This is the default setting. However, the log_archive_min_succeed_dest setting still applies.
  6. seconds: A retry interval. Oracle will retry a failed transfer after the specified number of seconds.

Using this new method of specifying archive log destinations is not compatible with the 8.0 method. Oracle8i still supports the old method, but you must use either the old or the new. You can't mix them.
Question: In which way have Archive log destinations changed between Oracle 8i and Oracle 13c?
The way archive log destinations work has changed significantly between Oracle 8i and Oracle 13c. Here are the key differences:
  1. Oracle 8i: In Oracle 8i, archive log destinations are specified using the LOG_ARCHIVE_DEST parameter. This parameter can be set to a local directory or a remote destination, such as a tape drive. However, only one archive log destination can be specified at a time.
  2. Oracle 9i: Starting with Oracle 9i, multiple archive log destinations can be specified using the LOG_ARCHIVE_DEST_n parameters, where "n" is a number between 1 and 10. This allows for greater flexibility in configuring archive log destinations.
  3. Oracle 10g: In Oracle 10g, a new parameter called LOG_ARCHIVE_DEST_STATE_n was introduced, which allows you to specify the state of each archive log destination. This can be set to enable or disable each destination individually, depending on your needs.
  4. Oracle 11g: Starting with Oracle 11g, you can use the LOG_ARCHIVE_DEST_n parameter to specify up to 30 archive log destinations, including local directories, remote destinations, and standby databases. This greatly increases the flexibility and scalability of archive log destination configuration.
  5. Oracle 12c: In Oracle 12c, a new parameter called LOG_ARCHIVE_DEST_1 has been introduced, which allows you to specify the primary archive log destination. This is typically a local directory or a remote destination. You can also specify additional destinations using the LOG_ARCHIVE_DEST_n parameters.
  6. Oracle 13c: Starting with Oracle 13c, a new feature called Automatic Redo Transport (ART) has been introduced, which simplifies archive log destination configuration. ART automatically configures archive log destinations based on the primary and standby database settings. This eliminates the need to manually configure archive log destinations, making it easier to set up and manage Oracle databases.
In summary, archive log destinations have evolved significantly from Oracle 8i to Oracle 13c, with new features and parameters being introduced to increase flexibility, scalability, and ease of use. By understanding these changes, you can configure archive log destinations more effectively and take full advantage of the features and capabilities of Oracle databases.

You will learn how to name archive log files in the next lesson.