码迷,mamicode.com
首页 > 数据库 > 详细

12c ADG reinstate database xxx

时间:2018-03-21 21:58:26      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:12C ADG   reinstate database   failover to xxx   

测试演练一下12C ADG环境,可能因为某些极端情况,比如主库存储异常,只能切换到备库。然后主库存储修复,重新恢复主备。

详见如下操作;
在新主库上操作

<roidb01:orcl:/home/oracle>$dgmgrl /
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected as SYSDG.
DGMGRL> 
DGMGRL> show configuration;

Configuration - dg_config

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

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 34 seconds ago)

DGMGRL> validate database orcldg;

  Database Role:    Primary database

  Ready for Switchover:  Yes

DGMGRL> validate database orcl;

  Database Role:     Physical standby database
  Primary Database:  orcldg

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

DGMGRL> failover to orcl;
Performing failover NOW, please wait...
Failover succeeded, new primary is "orcl"
DGMGRL> show configuration;

Configuration - dg_config

  Protection Mode: MaxPerformance
  Members:
  orcl   - Primary database
    orcldg - Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 71 seconds ago)

##保证原主库为mount状态

DGMGRL> reinstate database orcldg;
Reinstating database "orcldg", please wait...
Reinstatement of database "orcldg" succeeded
DGMGRL> show configuration;

Configuration - dg_config

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

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 6 seconds ago)
DGMGRL> validate database orcl;

  Database Role:    Primary database

  Ready for Switchover:  Yes

DGMGRL> validate database orcldg;

  Database Role:     Physical standby database
  Primary Database:  orcl

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

DGMGRL> 

12c ADG reinstate database xxx

标签:12C ADG   reinstate database   failover to xxx   

原文地址:http://blog.51cto.com/roidba/2089594

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!