Oracle Data Guard 26ai: Restricting Switchover and Failover Targets with PrimaryDatabaseCandidates

 Oracle AI Database 26ai introduces a useful enhancement for Data Guard environments that contain multiple standby databases. The new PrimaryDatabaseCandidates Data Guard Broker property allows administrators to explicitly define which databases are eligible to assume the primary role during switchover or failover operations.

This feature is particularly valuable in environments where some standby databases are dedicated to disaster recovery while others are used for reporting, testing, cloning, or other non-production purposes.


*The PrimaryDatabaseCandidates property is available starting with Oracle Database 19.26 Release Update (RU).

Test Environment

For this test, I configured a Data Guard environment consisting of one primary database and two physical standby databases.

DGMGRL> show configuration

Configuration - DB2

Protection Mode: MaxPerformance
Members:
DB2 - Primary database
dg1 - Physical standby database
dg2 - Physical standby database

Fast-Start Failover: Disabled

Configuration Status:
SUCCESS (status updated 20 seconds ago)

In this configuration:

  • DB2 is the primary database.
  • dg1 is intended to be the only standby eligible to become primary.
  • dg2 should remain a standby database and must not participate in switchover or failover operations.

Configuring PrimaryDatabaseCandidates

To restrict role transitions, I configured the PrimaryDatabaseCandidates property as follows:

DGMGRL> edit configuration set property PrimaryDatabaseCandidates='dg1';
Warning: ORA-16588: The primary database was added to property PrimaryDatabaseCandidates
Property "primarydatabasecandidates" updated

Attempting a Switchover to a Restricted Standby

Next, I attempted to perform a switchover to dg2, which is not included in the candidate list.

DGMGRL> switchover to dg2;
2026-02-25T15:42:39.854+03:30
Performing switchover NOW, please wait...
Error: ORA-16529: Switchover and failover operations are restricted to databases specified in the PrimaryDatabaseCandidates configuration property.
Failed.
2026-02-25T15:42:39.859+03:30
Unable to switchover, primary database is still "DB2"

As expected, Data Guard Broker blocked the operation and returned:

Error: ORA-16529: Switchover and failover operations are restricted to databases specified in the PrimaryDatabaseCandidates configuration property.

The primary database remained unchanged, and the switchover was not performed.

Comments

Popular posts from this blog

Oracle 21c Enhancements for TTS Export/Import

Automatic Service Failback to Preferred Instance in Oracle RAC 19c

Oracle 21c — Setting Compression Attribute for Indexes During Import