Skip to main content

How to Switchover to Physical Standby Using Dataguard Broker


<<Back to Oracle DataGuard Main Page

How to Switchover to Physical Standby Using dgmgrl

Note: In some cases I observed the bug and switchover hangs for forever when block change tracking is enabled and therefore it is recommended to disable the block change tracking before executing the switchover command and re-enable it after switchover is successful

Step0> Set correct environment
$export ORACLE_OHOME=/u01/app/oracle/product/12.1.0.2/dbhome_2
$export ORACLE_SID=APX1TP



Step1> Connect as sys over the tns to the database using dgmgrl 
$ 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.
DGMGRL> connect sys@APX1TP
Password:
Connected as SYSDBA.


Step2> Verify the Configuration
DGMGRL> show configuration;
Configuration - APX1T_DG
  Protection Mode: MaxAvailability
  Members:
  APX1TS - Primary database
    APX1TP - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS   (status updated 12 seconds ago)


Step3> Perform Switchover
DGMGRL> switchover to APX1TP
Performing switchover NOW, please wait...
New primary database "APX1TP" is opening...
Oracle Clusterware is restarting database "APX1TS" ...
Switchover succeeded, new primary is "APX1TP"


Step4> Verify the Configuration
DGMGRL>
show configuration;
Configuration - APX1T_DG
  Protection Mode: MaxAvailability
  Members:
  APX1TP - Primary database
    APX1TS - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS   (status updated 52 seconds ago)



Comments

  1. Good one Anand sir, but as per my experience we need to make sure static connect identifier should be configured correctly.

    ReplyDelete
  2. You say "the bug", which bug do you mean? Which bug number?

    ReplyDelete

Post a Comment