码迷,mamicode.com
首页 > 其他好文 > 详细

switchover步骤切换

时间:2016-02-03 20:52:52      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:

主库
alter system switch logfile;

alter system set log_archive_dest_state_2=‘defer‘;

select switchover_status from v$database;

alter database commit to switchover to physical standby with session shutdown;

shutdown immediate;

startup mount;

alter database recover managed standby database disconnect;


备库
alter database recover managed standby database disconnect; 转换不需要cancel先停掉,防止报ORA-16139: media recovery required,可能是由于未应用日志引起,可先执行

select switchover_status from v$database;

alter database commit to switchover to primary with session shutdown;

alter database open;

alter system set log_archive_dest_state_2=‘enable‘;

 

switchover步骤切换

标签:

原文地址:http://www.cnblogs.com/hllnj2008/p/5180470.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!