Specifying the Archive Destination - Oracle 10g

Before you can archive redo logs, you must determine the destination to which you will archive and familiarize yourself with the various destination states

Specifying Archive Destinations

You can choose whether to archive redo logs to a single destination or multiplex them. If you want to archive only to a single destination, you specify that destination in the LOG _ARCHIVE _DEST initialization parameter. If you want to multiplex the archived logs, you can choose whether to archive to up to ten locations (using the LOG _ARCHIVE _DEST _n parameters) or to archive only to a primary and secondary destination (using LOG _ARCHIVE _DEST and LOG _ ARCHIVE _DUPLEX _DEST). The following table summarizes the multiplexing alternatives, which are further described in the sections that follow.

Specifying Archive Destinations

Method 1: Using the LOG_ARCHIVE_DEST_n Parameter

Use the LOG_ARCHIVE_DEST_n parameter (where n is an integer from 1 to 10) to specify from one to ten different destinations for archival. Each numerically suffixed parameter uniquely identifies an individual destination.

You specify the location for LOG_ARCHIVE_DEST_n using the keywords explained in the following table:

Using the LOG_ARCHIVE_DEST_n Parameter

If you use the LOCATION keyword, specify a valid path name for your operating system. If you specify SERVICE, the database translates the net service name through the tnsnames.ora file to a connect descriptor. The descriptor contains the information necessary for connecting to the remote database. The service name must have an associated database SID, so that the database correctly updates the log history of the control file for the standby database.

Perform the following steps to set the destination for archived redo logs using the LOG_ARCHIVE_DEST_n initialization parameter:

  1. Use SQL*Plus to shut down the database.
  3. Set the LOG_ARCHIVE_DEST_n initialization parameter to specify from one to ten archiving locations. The LOCATION keyword specifies an operating system specific path name. For example, enter:
    LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive' LOG_ARCHIVE_DEST_2 = 'LOCATION = /disk2/archive' LOG_ARCHIVE_DEST_3 = 'LOCATION = /disk3/archive'

    If you are archiving to a standby database, use the SERVICE keyword to specify a valid net service name from the tnsnames.ora file. For example, enter:

    LOG_ARCHIVE_DEST_4 = 'SERVICE = standby1'
  4. Optionally, set the LOG _ARCHIVE _FORMAT initialization parameter, using %t to include the thread number as part of the file name, %s to include the log sequence number, and %r to include the resetlogs ID (a timestamp value represented in ub4). Use capital letters (%T, %S, and %R) to pad the file name to the left with zeroes.

    The following example shows a setting of LOG_ARCHIVE_FORMAT:

    LOG_ARCHIVE_FORMAT = arch_%t_%s_%r.arc

    This setting will generate archived logs as follows for thread 1; log sequence umbers 100, 101, and 102; resetlogs ID 509210197. The identical resetlogs ID indicates that the files are all from the same database incarnation:

    /disk1/archive/arch_1_100_509210197.arc, /disk1/archive/arch_1_101_509210197.arc, /disk1/archive/arch_1_102_509210197.arc /disk2/archive/arch_1_100_509210197.arc, /disk2/archive/arch_1_101_509210197.arc, /disk2/archive/arch_1_102_509210197.arc /disk3/archive/arch_1_100_509210197.arc, /disk3/archive/arch_1_101_509210197.arc, /disk3/archive/arch_1_102_509210197.arc


To specify a maximum of two locations, use the LOG_ARCHIVE_DEST parameter to specify a primary archive destination and the LOG_ARCHIVE_DUPLEX_DEST to specify an optional secondary archive destination. All locations must be local. Whenever the database archives a redo log, it archives it to every destination specified by either set of parameters.

Perform the following steps the use method 2:

  1. Use SQL*Plus to shut down the database.
  2. Specify destinations for the LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST parameter (you can also specify LOG_ARCHIVE_DUPLEX_DEST dynamically using the ALTER SYSTEM statement). For example, enter:
    LOG_ARCHIVE_DEST = '/disk1/archive' LOG_ARCHIVE_DUPLEX_DEST = '/disk2/archive'
  3. Set the LOG_ARCHIVE_FORMAT initialization parameter as described in step 3 for method 1.

Understanding Archive Destination Status

Each archive destination has the following variable characteristics that determine its status:

  • Valid/Invalid: indicates whether the disk location or service name information is specified and valid
  • Enabled/Disabled: indicates the availability state of the location and whether the database can use the destination
  • Active/Inactive: indicates whether there was a problem accessing the destination

Several combinations of these characteristics are possible. To obtain the current status and other information about each destination for an instance, query the V$ARCHIVE_DEST view.

The characteristics determining a locations status that appear in the view. Note that for a destination to be used, its characteristics must be valid, enabled, and active.

Destination Status

Destination StatusDestination Status

The LOG_ARCHIVE_DEST_STATE_n (where n is an integer from 1 to 10) initialization parameter lets you control the availability state of the specified destination (n).

  • ENABLE indicates that the database can use the destination.
  • DEFER indicates that the location is temporarily disabled.
  • ALTERNATE indicates that the destination is an alternate.

The availability state of the destination is DEFER, unless there is a failure of its parent destination, in which case its state becomes ENABLE.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 10g Topics