log_archive_dest与log_archive_dest_n区别
2013-03-21 16:40
274 查看
1.log_archive_dest.
使用log_archive_dest参数最多可设置2个归档路径,通过log_archive_dest设置一个主归档路径,通过LOG_ARCHIVE_DUPLEX_DEST 参数设置一个从归档路径。所有的路径必须是本地的,该参数的设置格式如下:
LOG_ARCHIVE_DEST = '/disk1/archive'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/archive'
2.LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_n参数可以设置最多10(n=[1..10])个不同的归档路径,通过设置关键词location或service,该参数指向的路径可以是本地或远程的。
LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'
LOG_ARCHIVE_DEST_2 = 'LOCATION = /disk2/archive'
LOG_ARCHIVE_DEST_3 = 'LOCATION = /disk3/archive'
如果要归档到远程的standby数据库,可以设置service:
LOG_ARCHIVE_DEST_4 = 'SERVICE = standby1'
可见,这两个参数都可以设置归档路径,不同的是后者可以设置远程归档到standby端,而前者只能归档到本地,且最多同时归档到2个路径下。
log_archive_dest与log_archive_dest_n这两个参数是互斥的,Oracle之所以保留log_archive_dest和 log_archive_duplex_dest是为了保证向后的兼容。
见下面的官方文档:
LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be
defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape
is not supported on all operating systems.) The value cannot be a raw partition.
其中:
and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string.
就是这个意思:
下面做个实验证明下这两个参数不能同时使用:
SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/bak/arch1';
System altered.
SQL> alter system set log_archive_dest_2='location=/u01/app/oracle/bak/arch2';
System altered.
SQL> alter system set log_archive_dest='location=/u01/app/oracle/bak/arch3';
alter system set log_archive_dest='location=/u01/app/oracle/bak/arch3'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or
DB_RECOVERY_FILE_DEST
使用log_archive_dest参数最多可设置2个归档路径,通过log_archive_dest设置一个主归档路径,通过LOG_ARCHIVE_DUPLEX_DEST 参数设置一个从归档路径。所有的路径必须是本地的,该参数的设置格式如下:
LOG_ARCHIVE_DEST = '/disk1/archive'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/archive'
2.LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_n参数可以设置最多10(n=[1..10])个不同的归档路径,通过设置关键词location或service,该参数指向的路径可以是本地或远程的。
LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'
LOG_ARCHIVE_DEST_2 = 'LOCATION = /disk2/archive'
LOG_ARCHIVE_DEST_3 = 'LOCATION = /disk3/archive'
如果要归档到远程的standby数据库,可以设置service:
LOG_ARCHIVE_DEST_4 = 'SERVICE = standby1'
可见,这两个参数都可以设置归档路径,不同的是后者可以设置远程归档到standby端,而前者只能归档到本地,且最多同时归档到2个路径下。
log_archive_dest与log_archive_dest_n这两个参数是互斥的,Oracle之所以保留log_archive_dest和 log_archive_duplex_dest是为了保证向后的兼容。
见下面的官方文档:
LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be
defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape
is not supported on all operating systems.) The value cannot be a raw partition.
其中:
and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string.
就是这个意思:
下面做个实验证明下这两个参数不能同时使用:
SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/bak/arch1';
System altered.
SQL> alter system set log_archive_dest_2='location=/u01/app/oracle/bak/arch2';
System altered.
SQL> alter system set log_archive_dest='location=/u01/app/oracle/bak/arch3';
alter system set log_archive_dest='location=/u01/app/oracle/bak/arch3'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or
DB_RECOVERY_FILE_DEST
相关文章推荐
- log_archive_dest&log_archive_dest_n&db_recovery_file_dest的区别
- log_archive_dest 和log_archive_dest_1 设置归档的区别
- standby_archive_dest和log_archive_dest_n区别
- log_archive_dest与log_archive_dest_n区别
- log_archive_dest与log_archive_dest_n区别
- 详解LOG_ARCHIVE_DEST与log_archive_dest_n区别
- LOG_ARCHIVE_DEST与log_archive_dest_n区别---Oracle基础
- log_archive_dest&log_archive_dest_n&db_recovery_file_dest
- log_archive_min_succeed_dest的一次实验
- ORA-16019: cannot use LOG_ARCHIVE_DEST_1在ASM下的救赎
- [Oracle Mgmt] Query Archivelog Mode, Change Archivelog Dest, etc.
- ORA-16025: parameter LOG_ARCHIVE_DEST_2
- log_archive_dest&log_archive_dest_n&db_recovery_file_dest
- ORA-16032: parameter LOG_ARCHIVE_DEST_3 destination string cannot be translated问题处理过程
- 【10g中db_recovery_file_dest和log_archive_dest参数的关系】
- log_archive_dest_n参数解释
- ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated ORA-01264: Unable to
- 转载:LOG_ARCHIVE_DEST_n参数属性――DATA GUARD概念和管理
- ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST
- 归档日志路径三个参数DB_RECOVERY_FILE_DEST和LOG_ARCHIVE_DEST和LOG_ARCHIVE_DEST_n