Linux环境下oracle9i的Data guard配置
2007-05-10 12:18:33 来源:WEB开发网Database altered.
8. 在主节点设置归档路径
SQL> alter system set log_archive_dest_2='service=standby mandatory reopen=60';
System altered.
定义了主库向副库传输日志。
# 定义归档到备用库,强制归档,重试时间60秒。
# 如果定义为可选状态(optional),那么在归档失败后不会再次尝试归档的。定义
# 为madatory状态后,如果本次归档失败,则在归档下一个日志时会再次尝试。
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL>
在备用节点观察日志:
[oracle@eygle bdump]$ tail -f alert_primary.log
MRP0: Background Managed Standby Recovery process started
Starting datafile 1 recovery in thread 1 sequence 90
Datafile 1: '/opt/oracle/oradata/primary/system01.dbf'
Starting datafile 2 recovery in thread 1 sequence 90
Datafile 2: '/opt/oracle/oradata/primary/undotbs01.dbf'
…………………………
-bash-2.05b$ mkdir /home/oracle/oradata/oracle/stdarch
-------------------------------------------------------
9.主辅数据库的切换(停止主数据库,启用备用数据库)
修改primary的参数文件initoracle.ora(先做好备份)
增加
*.standby_archive_dest='/home/oracle/oradata/standbyarch'
*.fal_server='standby'
*.fal_client='primary'
赞助商链接