Perform a Manual Failover

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. 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.

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 Manual Failover to a Local 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.

When you add a local Autonomous Data Guard standby and automatic failover is not successful, Oracle Cloud Infrastructure console shows a banner with information about why the automatic failover was not successful. The Oracle Cloud Infrastructure console also 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 is unavailable and a standby database is available. That is, the 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 Disaster recovery and for the standby database listed in the Peer Autonomous Database column, check that the State field shows Available or Stopped.

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 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 when the primary database is unavailable and the local standby is available:

  1. On the Details page, under Disaster recovery, in the Local field, click Failover.

    This shows the Confirm Manual Failover to peer 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
  2. In the Confirm manual failover to peer dialog, enter the Autonomous Database name to confirm that you want to failover.
  3. In the Confirm manual failover to peer dialog, click Confirm manual failover to peer.

See Notes for Manual Failover with a Standby Database for information on steps that Autonomous Data Guard takes after failover completes.

Perform Manual Failover to a Cross-Region Standby Database

If a cross-region standby is available, you can perform a switchover to make the cross-region standby database the primary database. 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. When you initiate a manual failover, Autonomous Database 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.

With both a local Autonomous Data Guard standby and a cross-region Autonomous Data Guard 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 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.

Using the API, you can initiate manual failover at any time. See Use the API for information on using the API.

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 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:

  1. On the standby database, perform a switchover. See Perform a Switchover to a Cross-Region Standby 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 are active, the confirmation also confirms either pausing or canceling the concurrent operation. See Concurrent Operations on Autonomous Database for more information.

See Notes for Manual Failover with a Standby Database for information on steps that Autonomous Data Guard takes after failover completes.

Notes for Manual Failover with a Standby Database

When the failover completes, Autonomous Data Guard performs post failover steps.
  • 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.

  • For a failover to a cross-region standby, if there was a local standby before the failover, Autonomous Data Guard makes the local standby available again for a switchover or failover on the current Primary.

  • 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. The manual failover data loss is specified in minutes.

    This information also shows when you hover over the tooltip icon in the Role field.

  • After a manual Autonomous Data Guard failover, if there was a regional failure, when the region comes back online the standby database is automatically reconnected or if required reprovisioned.