LOG_ARCHIVE_DEST中的参数作用

转自:http://www.oralife.cn/html/2007/173_log_archive_dest_parameter.html/174
一、AFFIRM和NOAFFIRM
作用:控制日志传输服务是异步还是同步写日志数据到磁盘
AFFIRM:在日志写进程进行之前,所以的归档日志和备库日志必须同步写完
NOFFIRM:在主库的日志写进程不等所有磁盘IO完成
缺省的是NOFFIRM
使用AFFIRM时,可以确保以下三点:
1能确保数据没有丢失在主库失败后
2 可以在本地或远程使用
3 影响主库的性能
LGWR和AFFIRM,日志写进程同步写REDO DATA到磁盘,在DISK写完前,控制权不交给用户,还有主库的在线日志可能不可用在归档完成之前
ARCH和AFFIRM ARCn进程同步写REDO DATA到磁盘,归档操作可能发生时间比较长,主库的在线日志在归档完成日志前可能不可用。
ASYNC和AFFIRM,性能不受影响。
二、ALTERNATE
作用:当原归档目的地失败后,可以使用后补的
但是如果REOPEN参数的值不为O的话,ALTERNATE将不可用。
如果MAX FAILURE值不为0,当执行了指定的失败重试次数后,ALTERNATE将备启用,因此,ALTERNATE将不和REPOPEN冲突(REOPEN不为0)
使用说明:
ALTERNATE是可选的,如果不设置,日志传输服务将不能自动切换归档路径,如果原路径不可用了
你可以指定一个ALTERNATE对每一个LOG_ARCHIVE_DEST,但是可以共享同一个ALTERNATE
LOG_ARCHIVE_DEST_1=’LOCATION=/disk1 MANDATORY ALTERNATE=LOG_ARCHIVE_DEST_2′
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_2=’LOCATION=/disk2 MANDATORY’
LOG_ARCHIVE_DEST_STATE_2=ALTERNATE
LOG_ARCHIVE_DEST_1=’LOCATION=/disk1 MANDATORY’
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_2=’SERVICE=stby1_path1 OPTIONAL ALTERNATE=LOG_ARCHIVE_DEST_3′
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_DEST_3=’SERVICE=stby1_path2 OPTIONAL’
LOG_ARCHIVE_DEST_STATE_3=ALTERNATE
三ARCH和LGWR
作用:日志传输服务使用ARCH还是LGWR,
缺省的是ARCH
注意的是如果你改变了当前的归档进程,比如说从ARCn到LGWR,只有日志切换了。改变才生效。
LOG_ARCHIVE_DEST_3=’SERVICE=denver LGWR’
LOG_ARCHIVE_DEST_STATE_3=ENABLE
四DB_UNIQUE_NAME
标示唯一的路径
如果使用了次参数通常也设置LOG_ARCHIVE_CONFIG=DG_CONFIG()两者要匹配,还有必须和参数文件里一致
使用此参数主要是为了明确主库和备库使用那个路径
DB_UNIQUE_NAME=boston
LOG_ARCHIVE_CONFIG=’DG_CONFIG=(chicago,boston,denver)’
LOG_ARCHIVE_DEST_1=’LOCATION=/arch1/
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=boston’
LOG_ARCHIVE_DEST_2=’SERVICE=Sales_DR
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=chicago’
五、DELAY
作用:
规定:REDO 数据在备库归档和应用的时间
缺省没有延迟
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:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;
For a logical standby database:
SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NODELAY;
例子:
LOG_ARCHIVE_DEST_1=’LOCATION=/oracle/dbs/’
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_2=’SERVICE=stbyB LGWR SYNC AFFIRM’
LOG_ARCHIVE_DEST_STATE_2=ENABLE
LOG_ARCHIVE_DEST_3=’SERVICE=stbyC DELAY=120′
LOG_ARCHIVE_DEST_STATE_3=ENABLE
六、location和service
每一个路径必须指名是本地还是通过服务
Example 1 Specifying the LOCATION Attribute
LOG_ARCHIVE_DEST_2=’LOCATION=/disk1/oracle/oradata/payroll/arch/’
LOG_ARCHIVE_DEST_STATE_2=ENABLE
Example 2 Specifying the SERVICE Attribute
LOG_ARCHIVE_DEST_3=’SERVICE=stby1′
LOG_ARCHIVE_DEST_STATE_3=ENABLE
七、MANDATORY and OPTIONAL
MANDATORY:在在线日志重用前,必须备成功归档
OPTIONAL:在在线日志可备重用前,不要求成功在DESTINATION归档
缺省的为OPTIONAL
You must have at least one local destination, which you can declare OPTIONAL or MANDATORY.
At least one local destination is operationally treated as mandatory, because the minimum value for the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter is 1.
The failure of any mandatory destination, including a mandatory standby destination, makes the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter irrelevant.
The LOG_ARCHIVE_MIN_SUCCEED_DEST parameter value cannot be greater than the number of mandatory destinations plus the number of optional local destinations.
These attributes do not affect the data protection mode for the destination.
The BINDING column of the V$ARCHIVE_DEST fixed view specifies how failure affects the archival operation
Examples
The following example shows the MANDATORY attribute:
LOG_ARCHIVE_DEST_1=’LOCATION=/arch/dest MANDATORY’
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_3=’SERVICE=denver MANDATORY’
LOG_ARCHIVE_DEST_STATE_3=ENABLE
八:VALID_FOR
原文这里丢了,有空自己补上。

你可能感兴趣的:(oracle,sql,UP)