本文主要是介绍oracle 10g 逻辑standby 切换步骤,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
(1)switchover:
主库:alter database prepare to switchover to logical standby;
备库:alter database prepare to switchover to primary;
--此时,备库应该将日志应用完毕
alter database start logical standby apply:
主库:alter database commit to switchover to logical standby;
备库:alter database commit to switchover to primary;
上原来的主库查询:
select database_role from v$database;
DATABASE_ROLE
----------------
LOGICAL STANDBY
然后上备库查:
select database_role from v$database;
DATABASE_ROLE
----------------
PRIMARY
(2)failover:
如果主库发生故障,要将备库作为主库,运行:
alter database activate logical standby database;
startup force;
备库起来以后,变成了主库。
这篇关于oracle 10g 逻辑standby 切换步骤的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!