Manual Failover with a Standby Database

When Autonomous Data Guard cannot automatically fail over to a local Standby database, if a local Standby database is available you can perform a manual failover to make the local Standby database the Primary database. If a cross-region Standby is available, you can perform a switchover to make the cross-region Standby database the Primary database and if the switchover fails, you can initiate a manual failover to the cross-region Standby. It is possible for data loss to occur with a manual failover.

Depending on how you enable Autonomous Data Guard, there are different steps to perform a manual failover to a Standby database:

  • When you enable Autonomous Data Guard with just a cross-region (remote) Standby:

    When you enable a cross-region Standby and do not enable a local Standby, after you attempt a cross-region switchover and if the switchover fails, on the Standby database the Oracle Cloud Infrastructure console shows a failover link in the Role field that you can click to initiate a manual failover. Using the API, you can initiate manual failover at any time. See Use the API for information on using the API.

  • When you enable Autonomous Data Guard with a local Standby:

    When you enable a local Standby and automatic failover is not successful, Oracle Cloud Infrastructure console shows a banner with information about why the automatic failover was not successful and Oracle Cloud Infrastructure console shows a failover link in the Role field that you can click to initiate a manual failover to the local Standby. The failover link only shows when the Primary database in the primary region is unavailable and a Standby database is available. That is, the Primary database Lifecycle State field shows Unavailable and the local Standby database is available. Using the API, you can initiate manual failover at any time. See Use the API for information on using the API.

    To see the Standby database status, under Resources click Autonomous Data Guard and for the Standby database listed in the Peer Autonomous Database column check that the State field shows Available or Stopped.
  • When you enable Autonomous Data Guard with both a local Standby and a cross-region (remote) Standby:

    With Autonomous Data Guard enabled with both a local Standby and a cross-region Standby, when automatic failover is not successful and the local Standby database is available, Oracle recommends that you attempt a manual failover to the local Standby first (not to the remote region Standby).

    If a local Standby is unavailable or a manual failover to the local Standby fails, you can perform a manual switchover to the cross-region Standby. If the switchover to the cross-region Standby fails, on the Standby database the Oracle Cloud Infrastructure console shows a failover link in the Role field that you can click to initiate a manual failover to the Standby database.

When you initiate a manual failover Autonomous Data Guard fails over to the Standby database based on the Recovery Time Objective (RTO) and Recovery Point Objective (RPO) targets. See Autonomous Data Guard Recovery Time Objective (RTO) and Recovery Point Objective (RPO) for more information.

Perform the following prerequisite steps as necessary:

  • Open the Oracle Cloud Infrastructure Console by clicking the navigation icon next to Oracle Cloud.

  • From the Oracle Cloud Infrastructure left navigation menu click Oracle Database and then, depending on your workload click one of: Autonomous Data Warehouse, Autonomous JSON Database, or Autonomous Transaction Processing.
  • On the Autonomous Databases page select your Autonomous Database from the links under the Display Name column.

To initiate a manual failover to a cross-region Standby, do the following:

  1. On the Standby database, perform a switchover. See Perform a Switchover for details.

  2. If the switchover attempt in Step 1 fails, on the Standby database the Role field shows a Failover link. On the Standby database, click the Failover link.

    This shows the Confirm Manual Failover to Standby dialog, along with information on possible data loss that may result if you perform the manual failover to the Standby database.

  3. In the Confirm Manual Failover to Standby dialog, enter the Autonomous Database name to confirm that you want to failover.

  4. In the Confirm Manual Failover to Standby dialog, click Confirm Manual Failover to Standby.

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

To initiate a manual failover when the Primary database is unavailable and the local Standby is available, do the following:

  1. On the Details page, under Autonomous Data Guard, in the Role field, click Failover.

    This shows the Confirm Manual Failover to Standby dialog, along with information on possible data loss that may result if you perform the manual failover to standby.

    Description of adb_failover_manual.png follows
    Description of the illustration adb_failover_manual.png
  2. In the Confirm Manual Failover to Standby dialog, enter the Autonomous Database name to confirm that you want to failover.
  3. In the Confirm Manual Failover to Standby dialog, click Confirm Manual Failover to Standby.
When the failover completes, Autonomous Data Guard does the following:
  • For a failover to the local Standby, Autonomous Data Guard creates a new local Standby database after the failover. Autonomous Data Guard is not enabled when the system is provisioning the new Standby database and the Role field shows Provisioning. After Autonomous Data Guard completes the provisioning step, then you have a new local Standby database and Autonomous Data Guard is enabled.

  • After a manual failover operation completes, you can see any data loss associated with the manual failover in the message on the Oracle Cloud Infrastructure console banner and if you hover over the tooltip icon in the Role field. The manual failover data loss is specified in minutes.

  • When you enable Autonomous Data Guard with both a local and a cross-region standby, Autonomous Data Guard does not provide a local standby while the remote region instance operates in the Primary role. Using the remote region in the Primary role is intended for use while the primary region is unavailable or for testing (a temporary scenario). After the primary region database returns to the Primary role, the local Standby will be available.