switchover步骤切换

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了switchover步骤切换相关的知识,希望对你有一定的参考价值。

主库
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步骤切换的主要内容,如果未能解决你的问题,请参考以下文章

oracle dg库switchover主备切换

DG中switchover切换操作

Switchover and Failover

Switchover and Failover说明

dataguard 在 sqlplus 下做switchover(主备角色转换)

达梦主备手工切换(switchover)