LOG_ARCHIVE_DEST_n 中的各屬性 (包括valid_for等)

tolywang發表於2010-09-01

  

VALID_FOR

Specifies whether redo data will be written to a destination, based on the following factors:

  • Whether the database is currently running in the primary or the standby role

  • Whether online redo log files, standby redo log files, or both are currently being archived on the database at this destination

Category VALID_FOR=(redo_log_type, database_role)
Data Type String value
Valid values Not applicable
Default Value VALID_FOR=(ALL_LOGFILES, ALL_ROLES)
Requires attributes None
Conflicts with attributes None
Corresponds to VALID_NOW, VALID_TYPE, and VALID_ROLE columns in the V$ARCHIVE_DEST view

Usage Notes

  • The VALID_FOR attribute is optional. However, Oracle recommends that the VALID_FOR attribute be specified for each redo transport destination at each database in a Data Guard configuration so that redo transport continues after a role transition to any standby database in the configuration.

  • To configure these factors for each LOG_ARCHIVE_DEST_n destination, you specify this attribute with a pair of keywords: VALID_FOR=(redo_log_type,database_role):

    • The redo_log_type keyword identifies the destination as valid for archiving one of the following:

      • ONLINE_LOGFILE—This destination is valid only when archiving online redo log files.

      • STANDBY_LOGFILE—This destination is valid only when archiving standby redo log files.

      • ALL_LOGFILES— This destination is valid when archiving either online redo log files or standby redo log files.

    • The database_role keyword identifies the role in which this destination is valid for archiving:

      • PRIMARY_ROLE—This destination is valid only when the database is running in the primary role.

      • STANDBY_ROLE—This destination is valid only when the database is running in the standby role.

      • ALL_ROLES—This destination is valid when the database is running in either the primary or the standby role.

  • If you do not specify the VALID_FOR attribute for a destination, by default, archiving online redo log files and standby redo log files is enabled at the destination, regardless of whether the database is running in the primary or the standby role. This default behavior. is equivalent to setting the (ALL_LOGFILES,ALL_ROLES) keyword pair on the VALID_FOR attribute.

  • The VALID_FOR attribute enables you to use the same initialization parameter file for both the primary and standby roles.

Example

The following example shows the default VALID_FOR keyword pair:

LOG_ARCHIVE_DEST_1='LOCATION=/disk1/oracle/oradata VALID_FOR=(ALL_LOGFILES, ALL_ROLES)'

When this database is running in either the primary or standby role, destination 1 archives all log files to the /disk1/oracle/oradata local directory location.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-672306/,如需轉載,請註明出處,否則將追究法律責任。

相關文章