Perform a Switchover

When you perform a switchover, the primary database becomes the standby database and the standby database becomes the primary database, with no data loss.

A switchover is typically done to test failover to the standby database for audit or certification reasons, or to test your application’s failover procedures when you have added an Autonomous Data Guard standby database.

For switchover to a standby database, the Oracle Cloud Infrastructure Console on the primary database shows a Switchover link under Disaster recovery area when both the primary database and a standby database are available. You can perform a switchover when the primary database Lifecycle state shows Available or Stopped, and a standby database is available (the State field shows Standby).

To see either local or cross region standby database state, on the Autonomous AI Database details page select the Disaster recovery tab and for a standby database listed in the Peer Autonomous AI Database column, check that the State shows Standby.

Using the Autonomous AI Database API, you can initiate the switchover operation at any time. See Use the API for more information.

Note: When Full Stack Disaster Recovery is enabled, the Autonomous AI Database details page, under Disaster recovery, shows the Full Stack DR field as Enabled. See Use Full Stack Disaster Recovery to Perform Switchover or Failover Operations for details on performing a switchover or a failover when Full Stack Disaster Recovery is enabled.

Perform a Switchover to a Local Standby

When you perform a switchover, the primary database becomes the standby database and the standby database becomes the primary database, with no data loss.

To perform switchover to a local standby, you access the primary database from the Oracle Cloud Infrastructure Console.

Perform the following prerequisite steps as necessary:

To perform a switchover to a local standby:

  1. On the Autonomous AI Database Details page, in the Disaster recovery area, in the Local field click Actions and in the menu select Switchover.

    As an alternative, to initiate a switchover you can select More actions and in the menu select Switchover.

  2. In the Confirm switchover to peer dialog, enter the peer database name to confirm that you want to perform the switchover.

  3. In the Confirm switchover to peer dialog, click Switchover.

    When concurrent operations such as scaling are active, the confirmation also confirms either pausing or canceling the concurrent operation. See Concurrent Operations on Autonomous AI Database for more information.

    The database Lifecycle state changes to Updating. To see the state of the peer database, select the Disaster recovery tab. The State column shows Role change in progress.

After the switchover completes, Autonomous AI Database reports the time of the last switchover in the Role field on the Autonomous AI Database Details page under Disaster recovery.

See Notes for Performing a Switchover for more information.

Perform a Switchover to a Cross Region Standby

When you perform a switchover, the primary database becomes the standby database and the standby database becomes the primary database, with no data loss.

Note: For a cross region switchover you must initiate the switchover from the Standby database.

You have several options to access the Standby database:

Note: When Full Stack Disaster Recovery is enabled, the Autonomous AI Database details page, under Disaster recovery, shows the Full Stack DR field as Enabled. See Use Full Stack Disaster Recovery to Perform Switchover or Failover Operations for details on performing a switchover or a failover when Full Stack Disaster Recovery is enabled.

To perform a switchover to a cross region standby:

  1. On the cross region standby database, on the Autonomous AI Database Details page, in the Disaster recovery area, in the Role field click Actions and in the menu select Switchover.

    As an alternative, to initiate a switchover you can select More actions and Switchover.

  2. In the Confirm switchover to peer dialog, enter the peer database name to confirm that you want to perform the switchover.

  3. In the Confirm switchover to peer dialog, click Switchover.

    When concurrent operations such as scaling are active, the confirmation also confirms either pausing or canceling the concurrent operation. See Concurrent Operations on Autonomous AI Database for more information.

    The database Lifecycle state changes to Updating. To see the state of the peer database, select the Disaster recovery tab. The State column shows Role change in progress.

When the switchover completes, Autonomous Data Guard does the following:

See Notes for Performing a Switchover for more information.

Notes for Performing a Switchover

Notes for performing a switchover on Autonomous AI Database.