primary数据库执行以下几步
1、select switchover_status,database_role from v$database; //显示 TO STANDBY 、PRIMARY
2、alter database commit to switchover to physical standby;
如果有活动的session使用 alter database commit to switchover to physical standby with session shutdown
3、重启实例,启动到read only
4、alter database recover managed standby database disconnect from session;
5、select database_role from v$database; //显示PHYSICAL STANDBY
standby数据库执行以下几步
1、select switchover_status,database_role from v$database; //显示TO PRIMARY、 PHYSICAL STANDBY
2、alter database commit to switchover to primary;
3、重启实例,到open状态