Oracle 12c-Performing Dataguard Failover Using DGMGRL Utility
Description:-
- We invoke a failover operation in response to an emergency situation, usually when the primary database cannot be accessed or is unavailable.
- We need to enable the flashback database for both side.So that we will REINSTATE easily after failover.
Note:-Now primary database is Prime After the failover primary database is Stand
Let’s start the Demo:-
Step1:-Show the configuration (login into standby side)
[oracle@standby ~]$ 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/oracle@stand
Connected as SYSDBA.
Step2:-Issue the SHOW CONFIGURATION command to verify the failover.
DGMGRL> SHOW CONFIGURATION;
Configuration – hari
Protection Mode: MaxPerformance
Members:
prime – Primary database
stand – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 11 seconds ago)
Step3:-Check the readiness of the target standby.
To validate the target standby database to ensure that it’s ready to become the new primary database, use the VALIDATE DATABASE command
DGMGRL> VALIDATE DATABASE ‘stand’;
Database Role: Physical standby database
Primary Database: prime
Ready for Switchover: Yes
Ready for Failover: Yes (Primary Running)
Step4:-Connect to the target standby database
To perform the failover operation, you must connect to the standby database
[oracle@standby ~]$ 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/oracle@stand
Connected as SYSDBA.
Step5:-Issue the failover command
Now you can issue the failover command to make the target standby database the new primary database for the configuration.
DGMGRL> FAILOVER TO ‘stand’;
Performing failover NOW, please wait…
Failover succeeded, new primary is “stand”
Step6:-Show the configuration.
DGMGRL> SHOW CONFIGURATION;
Configuration – hari
Protection Mode: MaxPerformance
Members:
stand – Primary database
prime – Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 1 second ago)
Successfully Failover completed using DGMGRL Utlility
Reference:-
https://docs.oracle.com/database/121/DGBKR/cli.htm#DGBKR495
Catch Me On:- Hariprasath Rajaram
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba