需求:
将节点一的归档日志在节点二上上保存一份,两节点都位主库。
节点一配置:
SQL> alter system set log_archive_dest_1='location=/home/oracle/arch/orcl19' scope=both;
System altered.
SQL> alter system set log_archive_dest_2='SERVICE=orcl async NOREGISTER valid_for=(online_logfile,primary_role) db_unique_name=orcl' scope=both;
System altered.
节点二配置:
SQL> alter system set log_archive_dest_1='location=/home/oracle/arch/orcl/dest1 valid_for=(online_logfile,primary_role)' scope=both;
System altered.
SQL> alter system set log_archive_dest_2='location=/home/oracle/arch/orcl/dest2 valid_for=(all_logfiles,all_roles)' scope=both;
System altered.
这种情况下节点一的归档日志能在节点二 log_archive_dest_2 指定的目录下能够保留
另外注意一点 配置 log_archive_dest_2 时 ,NOREGISTER 必须指定,下面我们模拟不指定 NO