Initialization Parameter
|
Host
|
Example
|
1
|
LOG_ARCHIVE_DEST_
n
where:
n is an integer from 1 to 10
|
Local or remote
|
LOG_ARCHIVE_DEST_1 = 'LOCATION=/disk1/arc'
LOG_ARCHIVE_DEST_2 = 'SERVICE=standby1'
|
2
|
LOG_ARCHIVE_DEST and
LOG_ARCHIVE_DUPLEX_DEST
|
Local only
|
LOG_ARCHIVE_DEST = '/disk1/arc'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/arc'
|
二者是互斥的,不能同时存在。
SQL> show parameter log_archive
NAME
TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config
string
log_archive_dest
string /opt/app/oracle/archivelog1
log_archive_dest_1
string
log_archive_dest_10
string
log_archive_dest_2
string
log_archive_dest_3
string
log_archive_dest_4
string
log_archive_dest_5
string
log_archive_dest_6
string
log_archive_dest_7
string
log_archive_dest_8
string
NAME
TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_9
string
log_archive_dest_state_1
string enable
log_archive_dest_state_10
string enable
log_archive_dest_state_2
string enable
log_archive_dest_state_3
string enable
log_archive_dest_state_4
string enable
log_archive_dest_state_5
string enable
log_archive_dest_state_6
string enable
log_archive_dest_state_7
string enable
log_archive_dest_state_8
string enable
log_archive_dest_state_9
string enable
NAME
TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_duplex_dest
string /opt/app/oracle/archivelog2
log_archive_format
string arch_%t_%s_%r.arc
log_archive_local_first
boolean TRUE
log_archive_max_processes
integer 2
log_archive_min_succeed_dest
integer 1
log_archive_start
boolean FALSE
log_archive_trace
integer 0
SQL> alter system archive log current;
System altered.
SQL> alter system archive log current;
System altered.
SQL> alter system archive log current;
System altered.
SQL> ho ls -l /opt/app/oracle/archivelog*
/opt/app/oracle/archivelog1:
total 27540
-rw-r----- 1 oracle oinstall 28157952 Aug 15 14:14 arch_1_3_791336149.arc
-rw-r----- 1 oracle oinstall
1024 Aug 15 14:14 arch_1_4_791336149.arc
-rw-r----- 1 oracle oinstall
2048 Aug 15 14:14 arch_1_5_791336149.arc
/opt/app/oracle/archivelog2:
total 27540
-rw-r----- 1 oracle oinstall 28157952 Aug 15 14:14 arch_1_3_791336149.arc
-rw-r----- 1 oracle oinstall
1024 Aug 15 14:14 arch_1_4_791336149.arc
-rw-r----- 1 oracle oinstall
2048 Aug 15 14:14 arch_1_5_791336149.arc
SQL> alter system set log_archive_dest_1='location=/opt/app/oracle/archivelog3' scope=spfile;
System altered.
SQL> alter system set log_archive_dest_2='location=/opt/app/oracle/archivelog4' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST
此时通过pfile启动后,修改其中的设置,保留一个即可。