大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

12cDataGuardswitchoverto'primary'-创新互联

一、环境描述
Oracle 12c
RHEL 7

成都创新互联公司是一家以网站建设、网页设计、品牌设计、软件运维、成都网站推广、小程序App开发等移动开发为一体互联网公司。已累计为公路钻孔机等众行业中小客户提供优质的互联网建站和软件开发服务。

二、操作
注意:需要在物理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>

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


名称栏目:12cDataGuardswitchoverto'primary'-创新互联
网址分享:http://dzwzjz.com/article/egcpi.html
在线咨询
服务热线
服务热线:028-86922220
TOP