This article is brought by en.enmotech.com
At the last part of this article we performed Switchover & Failover Operations on Oracle Data Guard using the dbaascli utility.
You can read it here:
Now in this one we will show the necessary steps to Reinstate using the dbaascli Utility
After performing a failover to the standby database, you may be able to restore your original disaster-recovery solution by reinstating the failed primary database. You can use the Data Guard broker's reinstate capability to make the failed primary database a viable standby database for the new primary.
Steps to Perform a Reinstating a Failed Primary Database using dbaascli utility
You can use the dataguard reinstate subcommand of the dbaascli utility to reinstate a failed primary database after a failover.
To determine whether the database can be reinstated, use the dataguard status subcommand as described in Checking the Status of the Oracle Data Guard Configuration.
A status of ORA-16661: the standby database needs to be reinstated indicates the standby database can be reinstated.
Let's Assume we come from this state:
To reinstate a failed primary database by using the dataguard reinstate subcommand:
|1. Connect to one of the compute nodes in the Oracle Data Guard configuration as the oracle user.|
Using username "opc".
Authenticating with public key "rsa-key-20170425"
Passphrase for key "rsa-key-20170425":
[opc@DATAGUARD-dg02 ~]$ sudo su - oracle
|2. Initiate the reinstatement of the failed primary database|
[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard reinstate
DBAAS CLI version 1.0.0
Executing command dataguard reinstate
Successfully reinstated dataguard instances
Detail : Successfully reinstated database : ORCL_02
3. Check the status of standby database
[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard status
DBAAS CLI version 1.0.0
Executing command dataguard status
SUCCESS : Dataguard is up and running
Configuration - fsc
Protection Mode: MaxPerformance
ORCL_01 - Primary database
ORCL_02 - Physical standby database
FastStartFailoverThreshold = '30'
OperationTimeout = '120'
FastStartFailoverLagLimit = '30'
CommunicationTimeout = '180'
ObserverReconnect = '0'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
ObserverOverride = 'FALSE'
ExternalDestination1 = ''
ExternalDestination2 = ''
PrimaryLostWriteAction = 'CONTINUE'
Fast-Start Failover: DISABLED
So now you know that it is very easy to Reinstate a failed primary database using dbaascli utility.
We hope this article is useful and we invite you to continue reading our next publications focused on Oracle Cloud.
And as a Cloud related Topic, you can read here as well one of our hotest articles:
If you want to be updated with all our articles send us the Invitation or Follow us:
Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez
Skant Gupta's LinkedIn: www.linkedin.com/in/skantali/
or Join Oracle Cloud DBaaS LinkedIn Group: https://www.linkedin.com/groups/12065270
Full Index of Oracle Cloud Articles:
Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com
Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com