12c DataGuard switchover to 'primary'

发布时间:2020-06-03 04:38:33 作者:roidba
来源:网络 阅读:540

一、环境描述
Oracle 12c
RHEL 7

二、操作
注意:需要在物理standby节点执行切换,因为主节点要重启。

1.查看配置

DGMGRL> show configuration;

Configuration - dg_config

  Protection Mode: MaxAvailability
  Members:
  orcl   - Primary database
    orcldg - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 30 seconds ago)

2.验证主库

DGMGRL> validate database orcl;

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Flashback Database Status:
    orcl:  Off

3.验证物理备库

DGMGRL> validate database orcldg;

  Database Role:     Physical standby database
  Primary Database:  orcl

  Ready for Switchover:  Yes
  Ready for Failover:    Yes (Primary Running)

  Flashback Database Status:
    orcl:    Off
    orcldg:  On

  Standby Apply-Related Information:
    Apply State:      Running
    Apply Lag:        13 hours 29 minutes 48 seconds (computed 1 second ago)
    Apply Delay:      0 minutes

4.进行切换

DGMGRL> switchover to orcldg;
Performing switchover NOW, please wait...
New primary database "orcldg" is opening...
Oracle Clusterware is restarting database "orcl" ...
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.

        shut down instance "orcl" of database "orcl"
        start up instance "orcl" of database "orcl"

5.切换后确认

DGMGRL> show configuration;

Configuration - dg_config

  Protection Mode: MaxAvailability
  Members:
  orcldg - Primary database
    orcl   - Physical standby database 

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 30 seconds ago)

DGMGRL> 
推荐阅读:
  1. ORACLE 12C ADG 安装最新RU补丁
  2. Oracle 12c Data Guard 纯小白部署手册

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

12c dg swithover

上一篇:rman duplicate遇到ORA-17628 该怎么解决?

下一篇:nagios监控告警之网络流量监控(附pnp模板)

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》