ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

oracle 19c使用dgmgrl来执行switchover和failover切换

2021-04-14 21:04:40  阅读:480  来源: 互联网

标签:switchover DGMGRL lhr19c database lhr19cdg failover instance Connected dgmgrl


oracle 19c使用dgmgrl来执行switchover和failover切换

[oracle@raclhr-18c-n1 ~]$ dgmgrl sys/lhr@lhr19cdg
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Aug 16 16:30:25 2019
Version 19.2.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "lhr19cdg"
Connected as SYSDBA.
DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19c   - Primary database
    lhr19cdg - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 13 seconds ago)

DGMGRL> switchover to lhr19cdg
Performing switchover NOW, please wait...
New primary database "lhr19cdg" is opening...
Operation requires start up of instance "lhr19c" on database "lhr19c"
Starting instance "lhr19c"...
Connected to an idle instance.
ORACLE instance started.
Connected to "lhr19c"
Database mounted.
Database opened.
Connected to "lhr19c"
Switchover succeeded, new primary is "lhr19cdg"
DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19cdg - Primary database
    lhr19c   - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 62 seconds ago)

DGMGRL> failover to lhr19c
Performing failover NOW, please wait...
Error: ORA-16600: not connected to target standby database for failover

Failed.
Unable to failover
DGMGRL> exit
[oracle@raclhr-18c-n1 ~]$ dgmgrl sys/lhr@lhr19c
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Aug 16 16:33:37 2019
Version 19.2.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "lhr19c"
Connected as SYSDBA.
DGMGRL> failover to lhr19c
Performing failover NOW, please wait...
Failover succeeded, new primary is "lhr19c"
DGMGRL> 
DGMGRL> show configuration

Configuration - lhr19c

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

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 28 seconds ago)

DGMGRL>  reinstate database lhr19cdg
Reinstating database "lhr19cdg", please wait...
Operation requires shut down of instance "lhr19cdg" on database "lhr19cdg"
Shutting down instance "lhr19cdg"...
Connected to "lhr19cdg"
ORACLE instance shut down.
Operation requires start up of instance "lhr19cdg" on database "lhr19cdg"
Starting instance "lhr19cdg"...
Connected to an idle instance.
ORACLE instance started.
Connected to "lhr19cdg"
Database mounted.
Connected to "lhr19cdg"
Continuing to reinstate database "lhr19cdg" ...
Reinstatement of database "lhr19cdg" succeeded
DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19c   - Primary database
    lhr19cdg - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 32 seconds ago)

DGMGRL> switchover to lhr19cdg
Performing switchover NOW, please wait...
Operation requires a connection to database "lhr19cdg"
Connecting ...
Connected to "lhr19cdg"
Connected as SYSDBA.
New primary database "lhr19cdg" is opening...
Operation requires start up of instance "lhr19c" on database "lhr19c"
Starting instance "lhr19c"...
Connected to an idle instance.
ORACLE instance started.
Connected to "lhr19c"
Database mounted.
Database opened.
Connected to "lhr19c"
Switchover succeeded, new primary is "lhr19cdg"
DGMGRL> 
DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19cdg - Primary database
    lhr19c   - Physical standby database 
      Error: ORA-16541: member is not enabled

Fast-Start Failover:  Disabled

Configuration Status:
ERROR   (status updated 143 seconds ago)

DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19cdg - Primary database
    lhr19c   - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 30 seconds ago)

DGMGRL> switchover to lhr19c
Performing switchover NOW, please wait...
Operation requires a connection to database "lhr19c"
Connecting ...
Connected to "lhr19c"
Connected as SYSDBA.
New primary database "lhr19c" is opening...
Operation requires start up of instance "lhr19cdg" on database "lhr19cdg"
Starting instance "lhr19cdg"...
Connected to an idle instance.
ORACLE instance started.
Connected to "lhr19cdg"
Database mounted.
Database opened.
Connected to "lhr19cdg"
Switchover succeeded, new primary is "lhr19c"
DGMGRL> show configuration

Configuration - lhr19c

  Protection Mode: MaxPerformance
  Members:
  lhr19c   - Primary database
    lhr19cdg - Physical standby database 

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 56 seconds ago)

 

 

标签:switchover,DGMGRL,lhr19c,database,lhr19cdg,failover,instance,Connected,dgmgrl
来源: https://blog.51cto.com/lhrbest/2706681

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有