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 切换步骤)