oracle Data Guard 主备切换(Switchover和failover过程演示)

本文详细介绍了Oracle Data Guard的Switchover和Failover过程,包括如何在主库和备库之间进行角色转换,以及在主库故障时如何执行无损或有损切换,确保数据安全和业务连续性。
摘要由CSDN通过智能技术生成

Oracle Data Guard 主备切换

Oracle Dataguard的角色转换包含两类:Switchover和Failover。Switchover指主备之间角色转换,主库降为备库,备库升级为主库。而failover则是指主库出现问题时,备库切换为主库。

 

下面为官方定义:

 

Switchover

 

Allows the primary database to switch roles with one of its standby databases.There is no data loss during a switchover.After a switchover,each database continues to participate in the Data Guard configuration with its new role.

 

Failover

 

Changes a standby database to the primary role in response to a primary database failure.If the primary database was not operating in either          maximum protection mode or maximum availability mode before the failure,some data loss may occur.If Flashback Database is enabled on the primary database,it can be reinstated as a standby for the new primary database once the reason for the failure is corrected.

switchover

过程演示

 

在主库:

select name,DATABASE_ROLE from v$database;

 

 

检查归档日志有没有中断:

select status, GAP_STATUS from v$archive_dest_status where dest_id=2;

 

 

查询切换前主库的状态,状态为TO STANDBY,主库才可以切换到备库:

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值