阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

12c DataGuard switchover to ‘primary’

189次阅读
没有评论

共计 1382 个字符,预计需要花费 4 分钟才能阅读完成。

一、环境描述
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>

更多 Oracle 相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-12/149265.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计1382字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中