1、查看primary库转换状态
select switchover_status from v$database
如果是TO STANDBY可以直接进入步骤3
如果是SESSIONS ACTIVE进入步骤2
2、强制把primary设置为standby模式
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
如果更加强制性,则使用
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN NOWAIT;
3、正常方式进入standby模式
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
<