About Standby Databases

When you enable Autonomous Data Guard, the system creates a standby database that continuously gets updated with the changes from the primary database.

With Autonomous Data Guard enabled Autonomous Database provides one identical standby database that allows the following, depending on the state of the primary database:

  • If your primary database goes down, Autonomous Data Guard converts the standby database to the primary database with minimal interruption. After failover completes, Autonomous Data Guard creates a new standby database for you.

  • You can perform a switchover operation, where the primary database becomes the standby database, and the standby database becomes the primary database.

Autonomous Database does not provide access to the standby database. You perform all operations, such as scaling up the OCPU Count and enabling Auto Scaling on the primary database and Autonomous Data Guard then performs the same actions on the standby database. Likewise, you only perform actions such as stopping or restarting the database on the primary database.

Autonomous Data Guard Features

Autonomous Data Guard monitors the primary database and if the Autonomous Database instance goes down, then the standby instance assumes the role of the primary instance.

The standby database is created in the same region as the primary database. For better resilience, the standby database is provisioned as follows:

  • In regions with more than one availability domain, the standby database is provisioned automatically in a different availability domain than the primary database.

  • In regions with a single availability domain, the standby database is provisioned automatically on a different physical machine than the primary database.

See Regions and Availability Domains for more information.

All Autonomous Database features from the primary database are available when the standby instance becomes the primary after the system fails over or after you perform a switchover operation, including the following:

  • Database Options: The OCPU Count, Storage, Display Name, Database Name, Auto Scaling, Tags, and Licensing options have the same values after a failover to the standby database or after you perform a switchover.

  • OML Notebooks: Notebooks and users created in the primary database are available in the standby.

  • APEX Data and Metadata: APEX information created in the primary database is copied to the standby.

  • ACLs: The Access Control List (ACL) of the primary database is duplicated for the standby.

  • Private Endpoint: The private endpoint from the primary database applies to the standby.

  • APIs or Scripts: Any APIs or scripts you use to manage the Autonomous Database continue to work without any changes after a failover operation or after you perform a switchover.

  • Client Application Connections: Client applications do not need to change their connection strings to connect to the database after a failover to the standby database or after you perform a switchover.

  • Wallet Based Connections: You can continue using your existing wallets to connect to the database after a failover to the standby database or after you perform a switchover.

Autonomous Data Guard Recovery Time Objective (RTO) and Recovery Point Objective (RPO)

Autonomous Data Guard monitors the primary database and if the instance goes down, then the standby instance assumes the role of the primary instance according to the Recovery Time Objective (RTO) and Recovery Point Objective (RPO).

The RTO is the maximum amount of time required to restore database connectivity to a standby database after a manual or automatic failover is initiated. The RPO is the maximum duration of potential data loss, in minutes, on the primary database.

When Autonomous Data Guard is enabled the RTO and RPO numbers are as follows:

  • Automatic Failover: the RTO is two (2) minutes and RPO is zero (0).

  • Manual Failover: the RTO is two (2) minutes and RPO is up to five (5) minutes.

Autonomous Data Guard Operations

Autonomous Database provides the following operations with Autonomous Data Guard:

  • Enable: If Autonomous Data Guard is disabled, you can enable Autonomous Data Guard.

    See Enable a Standby Database for details.

  • Disable: If Autonomous Data Guard is enabled, you can disable Autonomous Data Guard. Disabling Autonomous Data Guard terminates the standby database.

    See Disable a Standby Database for details.

  • Switchover: When Autonomous Data Guard is enabled, switchover changes the roles of the primary and standby, your standby database becomes the primary, your primary database becomes the standby.

    The Oracle Cloud Infrastructure console shows a switchover link in the Peer State field when both the primary database and the standby database are available. That is, when the primary database Lifecycle State field shows Available or Stopped and the standby database is available (the Peer State field shows Available).

    See Perform a Switchover for details.

  • Manual Failover: You can perform a manual failover to make the standby database be the primary database.

    The Oracle Cloud Infrastructure console shows a failover link in the Peer State field, that you can click to initiate a manual failover, when the primary database is unavailable and the standby database is available. That is, the primary database Lifecycle State field shows Unavailable and the standby database is available (the Peer State field shows Available).

    See Manual Failover with a Standby Database for details.

  • Terminate: If you want to terminate a primary instance, select More Actions and Terminate. Terminating the primary instance also terminates the standby database.

Autonomous Database Standby Database States

Autonomous Database provides information about Autonomous Data Guard on the Autonomous Database Details page. This page shows Autonomous Data Guard information, including the status, enabled or disabled, and the state of the standby database.

The Status field shows the Autonomous Data Guard status information, as follows:

  • Enabled indicates Autonomous Data Guard is enabled.

  • Disabled indicates Autonomous Data Guard is not enabled.

The Peer State field shows the state of the standby database, as follows:

  • Provisioning

    • This state shows when you enable Autonomous Data Guard. This status is shown to indicate the standby database is provisioning (until the standby database is available).

    • This state shows after a failover when the standby database is being recreated.

    • If a restore from backup operation is performed on the primary database, then the standby is recreated and the Peer State field shows Provisioning.

  • Available: Indicates that the standby is available and ready for either a switchover or a failover operation.

  • Role Change in Progress Indicates a failover or switchover operation started.

Autonomous Data Guard Events with Autonomous Database

You can use Oracle Cloud Infrastructure events to respond when Autonomous Database changes its state due to an Autonomous Data Guard related event such as a failover or switchover operation.

Autonomous Database events include the following:

  • Begin disable Autonomous Data Guard
  • Begin enable Autonomous Data Guard
  • Begin failover
  • Begin switchover
  • End disable Autonomous Data Guard
  • End enable Autonomous Data Guard
  • End failover with failover result of success or failure.
  • End switchover with switchover result of success or failure.

Based on events you can perform actions or send notifications. See Events and Notifications for a Standby Database for more information on using events and producing notifications.

Autonomous Data Guard Notes

Note the following for using Autonomous Database with Autonomous Data Guard:

  • Autonomous Data Guard is not available with Always Free Autonomous Databases.

  • Autonomous Database does not provide access to the standby database:

    • You perform all operations, such as scaling up the OCPU Count and enabling Auto Scaling on the primary database and Autonomous Database performs the same actions on the standby database. Likewise, you only perform actions such as stopping or restarting the database on the primary database.

    • The standby database is not available for use as a read-only database.

  • The Number of OCPUs allocated graph and the CPU utilization graph on the Autonomous Database Service Console display the OCPUs allocated and the CPUs utilization for the primary database. These graphs do not include information about the standby database.

    The CPU Utilization metrics on the Oracle Cloud Infrastructure console metrics page displays the CPU utilization for the primary database. Other metrics on this page also apply to the primary database. These metrics do not include information about the standby database.

  • You cannot enable Autonomous Data Guard on Autonomous Database if your database version is Oracle Database 18c. You must first upgrade to Oracle Database 19c or higher to use Autonomous Data Guard. See Upgrade an Autonomous Database Instance to Oracle Database 19c for more information.

  • Automatic Failover is disabled during a Restore in Progress operation.

  • Automatic Failover is disabled when Upgrading a Database.

  • When the Lifecycle State field for the Primary database shows Stopped, the Standby database is also stopped. You may still perform a switchover when the Primary database is Stopped.