Oracle 19c Active Data Guard Switchover Procedure
Oracle 19c Active Data Guard Switchover Procedure
Oracle Active Data Guard provides high availability and disaster recovery by allowing seamless role transitions between the primary and standby databases. A switchover is a planned role reversal where the primary database becomes the standby, and the standby takes over as the new primary without data loss.
This guide covers the step-by-step procedure for switchover in Oracle 19c Active Data Guard.
1. Pre-Checks
Before initiating a switchover, ensure both databases are synchronized and healthy.
On both primary and standby:
-
Primary should show:
PRIMARY
,READ WRITE
-
Standby should show:
PHYSICAL STANDBY
,READ ONLY WITH APPLY
orMOUNTED
Also, confirm there are no active sessions or long-running transactions on the primary.
2. Verify Log Transport and Apply
Ensure redo logs are being shipped and applied correctly.
On Primary:
On Standby:
-
ARCH
andLGWR
processes should be running on primary. -
MRP
(Managed Recovery Process) should be running on standby.
3. Prepare Standby (Optional)
If standby is running in read-only with apply, cancel recovery before switchover:
4. Switchover Command (Primary)
On the Primary Database:
The database is now in standby mode.
5. Activate New Primary (Standby)
On the Standby Database:
The standby is now promoted to the new primary database.
6. Convert Former Primary to Standby
On the Former Primary (now mounted as standby):
This re-establishes redo apply.
7. Verify New Roles
On both databases:
Expected Results:
-
New Primary →
PRIMARY
,READ WRITE
-
New Standby →
PHYSICAL STANDBY
,MOUNTED
orREAD ONLY WITH APPLY
8. Post-Checks
Validate the overall Data Guard configuration.
Using Data Guard Broker (DGMGRL):
If Data Guard Broker is configured, switchover is much simpler:
Conclusion
A switchover in Oracle 19c Active Data Guard ensures a zero data loss, planned role reversal between primary and standby databases. This is typically done during planned maintenance, patching, or to test disaster recovery readiness.
Comments