DG参数 LOG_ARCHIVE_DEST_n

0    272    1

Tags:

👉 本文共约13479个字,系统预计阅读时间或需51分钟。

This chapter provides reference information for the attributes of the LOG_ARCHIVEDESTn initialization parameter. The following list shows the attributes:

AFFIRM and NOAFFIRM
ALTERNATE
COMPRESSION
DB_UNIQUE_NAME
DELAY
LOCATION and SERVICE
MANDATORY
MAX_CONNECTIONS
MAX_FAILURE
NET_TIMEOUT
NOREGISTER
REOPEN
SYNC and ASYNC
VALID_FOR

Each LOG_ARCHIVEDESTn destination must contain either a LOCATION or SERVICE attribute to specify a local disk directory or a remotely accessed database, respectively. All other attributes are optional.

Note:

Several attributes of the LOG_ARCHIVEDESTn initialization parameter have been deprecated. These attributes are supported for backward compatibility only and are documented in theOracle Database Reference.

See Also:

Chapter 6 for more information about defining LOG_ARCHIVEDESTn destinations and setting up redo transport services


AFFIRM and NOAFFIRM

Controls whether a redo transport destination acknowledges received redo data before or after writing it to the standby redo log:

  • AFFIRM—specifies that a redo transport destination acknowledges received redo data after writing it to the standby redo log.
  • NOAFFIRM—specifies that a redo transport destination acknowledges received redo data before writing it to the standby redo log.
CategoryAFFIRMNOAFFIRM
Data typeKeywordKeyword
Valid valuesNot applicableNot applicable
Default ValueNot applicableNot applicable
Requires attributesSERVICESERVICE
Conflicts with attributesNOAFFIRMAFFIRM
Corresponds toAFFIRM column of the V$ARCHIVE_DEST viewAFFIRM column of the V$ARCHIVE_DEST view

Usage Notes

  • If neither the AFFIRM nor the NOAFFIRM attribute is specified, the default is AFFIRM when the SYNC attribute is specified and NOAFFIRM when the ASYNC attribute is specified.
  • Specification of the AFFIRM attribute without the SYNC attribute is deprecated and will not be supported in future releases.

See also:

SYNC and ASYNC attributes

Examples

The following example shows the AFFIRM attribute for a remote destination.


ALTERNATE

Specifies an alternate archiving destination to be used when the original destination fails.

CategoryALTERNATE=LOG_ARCHIVEDESTn
Data TypeString
Valid ValueA LOG_ARCHIVEDESTn destination
Default ValueNone. If an alternate destination is not specified, then redo transport services do not automatically change to another destination.
Requires attributesNot applicable
Conflicts with attributesNone Foot 1
Corresponds toALTERNATE and STATUS columns of the V$ARCHIVE_DEST view

Footnote 1 If the REOPEN attribute is specified with a nonzero value, the ALTERNATE attribute is ignored. If the MAX_FAILURE attribute is also specified with a nonzero value, and the failure count exceeds the specified failure threshold, the ALTERNATE destination is enabled. Therefore, the ALTERNATE attribute does not conflict with a nonzero REOPEN attribute value.

Usage Notes

  • The ALTERNATE attribute is optional. If an alternate destination is not specified, then redo transport services do not automatically change to another destination if the original destination fails.
  • You can specify only one alternate destination for each LOG_ARCHIVEDESTn parameter, but several enabled destinations can share the same alternate destination.
  • Ideally, an alternate destination should specify either:
    • A different disk location on the same local standby database system (shown in Example 15-1)
    • A different network route to the same standby database system (shown in Example 15-2)
    • A remote standby database system that closely mirrors that of the enabled destination
  • If no enabled destinations reference an alternate destination, the alternate destination is implied to be deferred, because there is no automatic method of enabling the alternate destination. However, you can enable (or defer) alternate destinations at runtime using either ALTER SYSTEM.
  • Any destination can be designated as an alternate destination, given the following restrictions:
    • At least one local mandatory destination is enabled.
    • The number of enabled destinations must meet the defined LOG_ARCHIVE_MIN_SUCCEED_DEST parameter value.
    • A destination cannot be its own alternate.
  • Increasing the number of enabled destinations decreases the number of available alternate archiving destinations.
  • When a destination fails, its alternate destination is enabled on the next archival operation. There is no support for enabling the alternate destination in the middle of the archival operation because that would require rereading already processed blocks. This is identical to the REOPEN attribute behavior.
  • If the REOPEN attribute is specified with a nonzero value, the ALTERNATE attribute is ignored unless the MAX_FAILURE attribute has a nonzero value. If the MAX_FAILURE and REOPEN attributes have nonzero values and the failure count exceeds the specified failure threshold, the ALTERNATE destination is enabled. Therefore, the ALTERNATE attribute does not conflict with a nonzero REOPENattribute value.

Examples

In the sample initialization parameter file in Example 15-1, LOG_ARCHIVE_DEST_1 automatically fails over to LOG_ARCHIVE_DEST_2 on the next archival operation if an error occurs or the device becomes full.

Example 15-1 Automatically Failing Over to an Alternate Destination

Notice in the example that a destination can also be in the ALTERNATE state, as specified with the LOG_ARCHIVE_DESTSTATEn initialization parameter. The ALTERNATE state defers redo transport services from transmitting redo data to this destination until such time as another destination failure automatically enables this destination.

Example 15-2 Defining an Alternate Oracle Net Service Name to the Same Standby Database

This example shows how to define an alternate Oracle Net service name to the same standby database.


COMPRESSION

The COMPRESSION attribute is used to specify whether redo data is transmitted to a redo transport destination in compressed form or uncompressed form when resolving redo data gaps.

Note:

Redo transport compression is a feature of the Oracle Advanced Compression option. You must purchase a license for this option before using the redo transport compression feature.

CategoryCOMPRESSION=ENABLE or DISABLE
Data TypeBoolean
Valid valuesENABLE or DISABLE
Default valueDISABLE
Requires attributesNone
Conflicts with attributesNone
Corresponds toCOMPRESSION column of the V$ARCHIVE_DEST view

Usage Notes

  • The COMPRESSION attribute is optional. If it is not specified, the default compression behavior is DISABLE.

Example

The following example shows the COMPRESSION attribute with the LOG_ARCHIVEDESTn parameter.


DB_UNIQUE_NAME

Specifies a unique name for the database at this destination.

CategoryDB_UNIQUE_NAME=name
Data TypeString
Valid valuesThe name must match the value that was defined for this database with theDB_UNIQUE_NAME parameter.
Default valueNone
Requires attributesNone
Conflicts with attributesNone
Corresponds toDB_UNIQUE_NAME column of the V$ARCHIVE_DEST view

Usage Notes

  • This attribute is optional if:
    • The LOG_ARCHIVE_CONFIG=DG_CONFIG initialization parameter is not specified.
    • This is a local destination (specified with the LOCATION attribute).
  • This attributes is required if the LOG_ARCHIVE_CONFIG=DG_CONFIG initialization parameter is specified and if this is a remote destination (specified with the SERVICE attribute).
  • Use the DB_UNIQUE_NAME attribute to clearly identify the relationship between a primary and standby databases. This attribute is particularly helpful if there are multiple standby databases in the Data Guard configuration.
  • The name specified by the DB_UNIQUE_NAME must match one of the DB_UNIQUE_NAME values in the DG_CONFIG list. Redo transport services validate that the DB_UNIQUE_NAME attribute of the database at the specified destination matches the DB_UNIQUE_NAME attribute or the connection to that destination is refused.
  • The name specified by the DB_UNIQUE_NAME attribute must match the name specified by the DB_UNIQUE_NAME initialization parameter of the database identified by the destination.

Example

In the following example, the DB_UNIQUE_NAME parameter specifies boston (DB_UNIQUE_NAME=boston), which is also specified with the DB_UNIQUE_NAME attribute on the LOG_ARCHIVE_DEST_1parameter. The DB_UNIQUE_NAME attribute on the LOG_ARCHIVE_DEST_2 parameter specifies the chicago destination. Both boston and chicago are listed in the LOG_ARCHIVE_CONFIG=DG_CONFIGparameter.


DELAY

Specifies a time lag between when redo data is archived on a standby site and when the archived redo log file is applied to the standby database.

CategoryDELAY[=minutes]
Data TypeNumeric
Valid values>=0 minutes
Default Value30 minutes
Requires attributesSERVICE
Conflicts with attributesLOCATION
Corresponds toDELAY_MINS and DESTINATION columns of the V$ARCHIVE_DEST view

Usage Notes

  • The DELAY attribute is optional. By default there is no delay.

  • The DELAY attribute indicates the archived redo log files at the standby destination are not available for recovery until the specified time interval has expired. The time interval is expressed in minutes, and it starts when the redo data is successfully transmitted to, and archived at, the standby site.

  • The DELAY attribute may be used to protect a standby database from corrupted or erroneous primary data. However, there is a tradeoff because during failover it takes more time to apply all of the redo up to the point of corruption.

  • The DELAY attribute does not affect the transmittal of redo data to a standby destination.

  • If you have real-time apply enabled, any delay that you set will be ignored.

  • Changes to the DELAY attribute take effect the next time redo data is archived (after a log switch). In-progress archiving is not affected.

  • You can override the specified delay interval at the standby site, as follows:

    • For a physical standby database:

    • For a logical standby database:

See Also:

Oracle Database SQL Language Reference for more information about these ALTER DATABASE statements

Examples

You can use the DELAY attribute to set up a configuration where multiple standby databases are maintained in varying degrees of synchronization with the primary database. However, this protection incurs some overhead during failover, because it takes Redo Apply more time to apply all the redo up to the corruption point.

For example, assume primary database A has standby databases B and C. Standby database B is set up as the disaster recovery database and therefore has no time lag. Standby database C is set up with a 2-hour delay, which is enough time to allow user errors to be discovered before they are propagated to the standby database.

The following example shows how to specify the DELAY attribute for this configuration:

Note:

Alternatively, you can use Flashback Database to revert the database to a point-in-time or SCN in a different database incarnation as long as there is sufficient flashback log data. Using Flashback Database is described in Oracle Database Backup and Recovery User's Guide.


LOCATION and SERVICE

Each destination must specify either the LOCATION or the SERVICE attribute to identify either a local disk directory or a remote database destination where redo transport services can transmit redo data.

CategoryLOCATION=local_disk_directory orUSE_DB_RECOVERY_FILE_DESTSERVICE=net_service_name
Data typeString valueString value
Valid valuesNot applicableNot applicable
Default ValueNoneNone
Requires attributesNot applicableNot applicable
Conflicts with attributesSERVICE, DELAY, NOREGISTER, SYNC, ASYNC, NET_TIMEOUT, AFFIRM,NOAFFIRM, COMPRESSION, MAX_CONNECTIONSLOCATION
Corresponds toDESTINATION and TARGET columns of theV$ARCHIVE_DEST viewDESTINATION and TARGET columns of theV$ARCHIVE_DEST view

Usage Notes

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复