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

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)

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

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

 

 

上一篇:Redis 哨兵高可用(Sentinel)


下一篇:208、PostgreSQL12 如何手动failover