Infrastructure at your Service

Mouhamadou Diaw

Oracle 19C : Dynamic Change of Fast-Start Failover Target

Oracle 19C is now available on premise. There are lot of new features. One for the Data Guard Broker is that now we can dynamically change the fast-start failover target to a specified member in the list without disabling the fast-start failover.
I have tested this new feature and is describing this in this blog
I am using 3 servers with Oracle Linux
The Data Guard is already built and the broker is already configured
To enable the fast-start failover there are some requirements. Note that flashback database must be enabled for both databases.
First we put the the transport to SYNC for 3 databases

DGMGRL> edit database 'DB19C_SITE1' set property LogXptMode='SYNC';
Property "logxptmode" updated
DGMGRL> edit database 'DB19C_SITE2' set property LogXptMode='SYNC';
Property "logxptmode" updated
DGMGRL> edit database 'DB19C_SITE3' set property LogXptMode='SYNC';
Property "logxptmode" updated

After we change the protection to Maxavailability

DGMGRL>  EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability;
Succeeded.

Then we set the fast-start failover target for both databases

DGMGRL> enable fast_start failover;
Enabled in Zero Data Loss Mode.

Below the status of the configuration. And we can see that DB19C_SITE2 is the target for the fast-start failover

DGMGRL> show configuration

Configuration - db19c

  Protection Mode: MaxAvailability
  Members:
  DB19C_SITE1 - Primary database
    DB19C_SITE2 - (*) Physical standby database
    DB19C_SITE3 - Physical standby database

Fast-Start Failover: Enabled in Zero Data Loss Mode

Configuration Status:
SUCCESS   (status updated 55 seconds ago)

DGMGRL>

The status of the observer will also show as the active target

DGMGRL> show observer

Configuration - db19c

  Primary:            DB19C_SITE1
  Active Target:      DB19C_SITE2

Observer "standserver2" - Master

  Host Name:                    standserver2
  Last Ping to Primary:         2 seconds ago
  Last Ping to Target:          4 seconds ago

DGMGRL>

For example let’s say we want to switchover to DB19C_SITE3

DGMGRL> switchover to 'DB19C_SITE3';
Performing switchover NOW, please wait...
Error: ORA-16655: specified standby database not the current fast-start failover target standby

Failed.
Unable to switchover, primary database is still "DB19C_SITE1"
DGMGRL>

As we can see we cannot because the first fast-start failover target is DB19C_SITE2. We have to change it to DB19C_SITE3
To dynamiccaly do this change , we use the command SET FAST_START FAILOVER TARGET.

DGMGRL> SET FAST_START FAILOVER TARGET TO 'DB19C_SITE3';
Waiting for Fast-Start Failover target to change to "DB19C_SITE3"...
Succeeded.
DGMGRL>

We can query the broker to verify the change

DGMGRL> show configuration

Configuration - db19c

  Protection Mode: MaxAvailability
  Members:
  DB19C_SITE1 - Primary database
    DB19C_SITE3 - (*) Physical standby database
    DB19C_SITE2 - Physical standby database

Fast-Start Failover: Enabled in Zero Data Loss Mode

Configuration Status:
SUCCESS   (status updated 22 seconds ago)

DGMGRL>

And then now I can switchover to DB19C_SITE3

DGMGRL> switchover to 'DB19C_SITE3';
Performing switchover NOW, please wait...
New primary database "DB19C_SITE3" is opening...
Operation requires start up of instance "DB19C" on database "DB19C_SITE1"
Starting instance "DB19C"...
Connected to an idle instance.
ORACLE instance started.
Connected to "DB19C_SITE1"
Database mounted.
Database opened.
Connected to "DB19C_SITE1"
Switchover succeeded, new primary is "DB19C_SITE3"
DGMGRL>

And the new status of the configuration

DGMGRL> show configuration

Configuration - db19c

  Protection Mode: MaxAvailability
  Members:
  DB19C_SITE3 - Primary database
    DB19C_SITE1 - (*) Physical standby database
    DB19C_SITE2 - Physical standby database

Fast-Start Failover: Enabled in Zero Data Loss Mode

Configuration Status:
SUCCESS   (status updated 51 seconds ago)

DGMGRL>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mouhamadou Diaw
Mouhamadou Diaw

Consultant