Up to this point, most companies follow the same path.
However, only some organizations continue beyond this stage.
There are many reasons for this. One of the most important is that the primary database may be affected in terms of performance, because Data Guard is configured in SYNC mode and operates in a High Availability setup.
In such a configuration, the network must be fully stable and reliable, along with other operational considerations.
Now let’s move to the most important goal of this article: Fast Failover.
1. Checking Overall Data Guard Status
On one of the nodes:
dgmgrl sys/oracle@vahiddbdc2
show configuration;
At this stage, we verify that:
-
vahiddbdc2→ Primary -
vahiddb→ Physical Standby -
Configuration status → SUCCESS
-
Protection Mode → initially MaxPerformance
2. Creating an Application Service on Both Databases (on the PDB, and ONLY for PRIMARY)
On both nodes (using each database’s own name):
On vahiddbdc2 (current Primary):.
srvctl add service -db vahiddbdc2 -service APP_SERVICE -pdb vahidpdb -role PRIMARY -policy AUTOMATIC
srvctl start service -db vahiddbdc2 -service APP_SERVICE
On vahiddb (current Standby):
srvctl add service -db vahiddb -service APP_SERVICE -pdb vahidpdb -role PRIMARY -policy AUTOMATIC
On vahiddb, we do not start the service manually, because this service must come up automatically via Clusterware/Broker only when this database becomes PRIMARY.
3. Verifying Services in the Listener
On each node:
lsnrctl status
On the Primary node, you should see:
-
Service "APP_SERVICE" ... status READY
On the Standby node, APP_SERVICE must not be READY (unless it was mistakenly started manually).
4. Setting Redo Transport to SYNC for Zero Data Loss
In dgmgrl:
EDIT DATABASE vahiddbdc2 SET PROPERTY LogXptMode='SYNC';
EDIT DATABASE vahiddb SET PROPERTY LogXptMode='SYNC';
5. Changing Protection Mode to MaxAvailability
In the same dgmgrl session: