实例名:czmmiao1,czmmiao2
归档路径方案,每个节点上都存有个字的归档日志和对方节点的归档日志,以保证每个节点都有所有的归档日志。
设置步骤
1、在某节点配置归档日志位置
alter system set log_archive_dest_1='location=/u01/app/oracle/product/10.2.0/arch_czmiao1' scope=spfile sid='czmmiao1';
alter system set log_archive_dest_2='service=czmiao1' scope=spfile sid='czmmiao2';
alter system set standby_archive_dest='/u01/app/oracle/product/10.2.0/arch_czmiao2' scope=spfile sid='czmmiao1';
alter system set standby_archive_dest='/u01/app/oracle/product/10.2.0/arch_czmiao1' scope=spfile sid='czmmiao2';
alter system set log_archive_dest_1='location=/u01/app/oracle/product/10.2.0/arch_czmiao2' scope=spfile sid='czmmiao2';
alter system set log_archive_dest_2='service=czmiao2' scope=spfile sid='czmmiao1';
2、修改cluster_database参数
alter system set cluster_database=false scope=spfile sid='*';
3、关闭所有实例
shutdown immediate;
4、把某个实例启动到mount,修改归档模式
startup mount;
alter database archivelog;
alter system set cluster_database=true scope=spfile sid='*';
5、重启数据库确认归档生效
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/10.2.0/arch_czmmiao1
Oldest online log sequence 7
Next log sequence to archive 8
Current log sequence 8
6、确认生效位置
alter systemswitch logfile;
参考至:《大话Oracle RAC》张晓明著
本文原创,转载请注明出处、作者
如有错误,欢迎指正
邮箱:czmcj@163.com参考至