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
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string %t_%s_%r.dbf
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
remote_archive_enable string true
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_archive_dest string ?/dbs/arch 在node1下执行如下命令:alter system archive log current;
SQL> alter system archive log current;
System altered.
SQL>
在节点2下,查看
[oracle@node2 ~]$ cd 22
[oracle@node2 22]$ ll
total 852
-rw-r----- 1 oracle oinstall 854528 Jul 7 15:09 1_70_790532232.dbf
-rw-r----- 1 oracle oinstall 8704 Jul 7 15:11 1_71_790532232.dbf
[oracle@node2 22]$ cd ..
[oracle@node2 ~]$ cd 21
[oracle@node2 21]$ ll
total 836
-rw-r----- 1 oracle oinstall 846848 Jul 7 15:09 2_52_790532232.dbf
-rw-r----- 1 oracle oinstall 3072 Jul 7 15:11 2_53_790532232.dbf
[oracle@node2 21]$ cd $ORACLE_HOME/dbs
[oracle@node2 dbs]$ ll
total 44
-rw-rw---- 1 oracle oinstall 1552 Jul 7 15:07 hc_racdb2.dat
-rw-r----- 1 oracle oinstall 12920 May 3 2001 initdw.ora
-rw-r----- 1 oracle oinstall 8385 Sep 11 1998 init.ora
-rw-r----- 1 oracle oinstall 24 Aug 5 2012 initracdb2.ora
-rw-r----- 1 oracle oinstall 1536 Aug 5 2012 orapwracdb2
-rw-r----- 1 oracle oinstall 1536 Jul 7 15:07 spfileracdb2.ora
在节点2上设置standby_archvie_dest
SQL> alter system set standby_archive_dest='/home/oracle/33' sid='racdb2';
System altered.
在节点1,归档
SQL> alter system archive log current;
System altered.
查看节点2
[oracle@node2 ~]$ cd 33
[oracle@node2 33]$ ll
total 4
-rw-r----- 1 oracle oinstall 2048 Jul 7 15:14 1_72_790532232.dbf
[oracle@node2 33]$ cd ../22
[oracle@node2 22]$ ll
total 852
-rw-r----- 1 oracle oinstall 854528 Jul 7 15:09 1_70_790532232.dbf
-rw-r----- 1 oracle oinstall 8704 Jul 7 15:11 1_71_790532232.dbf
[oracle@node2 22]$
结论:
在没有设置standby_archvie_Dest的情况下,数据库会将归档放置在standby数据库的log_Archive_dest_n指定的目录下,如果指定了STANDBY_ARCHIVE_DEST则存放在standby_archive_Dest指定的目录下。