Before going through this post do visit Dataguard Broker Concepts and Administration- Part 1 and Dataguard Broker Concepts and Administration- Part 2
In this part we will try to Reinstate a failed primary database.Below mentioned are the steps to do it:
1) Restart the Old Primary Database.
Connect to primary database and used the following command to start the primary database.
sqlplus sys@ecpix1 as sysdba Enter password: SQL> startup mount ORACLE instance started. Total System Global Area 471867392 bytes Fixed Size 2130480 bytes Variable Size 255856080 bytes Database Buffers 209715200 bytes Redo Buffers 4165632 bytes Database mounted.
2) Reinstate the old primary database.
Connect to any database system in the broker configuration. For example
dgmgrl connect sys@ecpixsch1 Password: password Connected.
Once we are connected we will be executing below mentioned command to reinstate primary database
DGMGRL> REINSTATE DATABASE 'ecpix'; Reinstating database "ecpix", please wait... Operation requires shutdown of instance "ecpix" on database "ecpix" Shutting down instance "ecpix"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance "ecpix" on database "ecpix" Starting instance "ecpix"... ORACLE instance started. Database mounted. Continuing to reinstate database "ecpix" ... Reinstatement of database "ecpix" succeeded
3) Show the Configuration and Databases.
Once reinstate was executed successfully we will crosscheck configuration to confirm there is no issues
- Checking Configuration of Dataguard Broker.
DGMGRL> SHOW CONFIGURATION Configuration Name: DGConfig1 Enabled: YES Protection Mode: MaxPerformance Databases: ecpixsch - Primary database ecpix - Physical standby database Fast-Start Failover: DISABLED Current status for "DGConfig1": SUCCESS
- Checking Configuration of Primary and Standby Database.
Primary Database:
DGMGRL> show database ecpixsch Database Name: ecpixsch Role: PRIMARY Enabled: YES Intended State: TRANSPORT-ON Instance(s): ecpixsch Current status for "ecpixsch": SUCCESS
Standby Database:
DGMGRL> show database ecpix Database Name: ecpix Role: PHYSICAL STANDBY Enabled: YES Intended State: APPLY-ON Instance(s): ecpix Current status for "ecpix": SUCCESS