Use a Cross Tenancy Autonomous Data Guard Standby Database
You can add a cross tenancy Autonomous Data Guard standby database. This creates an Autonomous Data Guard standby that resides in a different tenancy. The cross tenancy standby can be in the same region (local) or in a different region (cross-region).
- About Cross Tenancy Autonomous Data Guard
When you add a cross tenancy Autonomous Data Guard standby, Autonomous Database provisions a standby database in a remote tenancy. - Prerequisites to Create a Cross Tenancy Autonomous Data Guard Standby
Describes prerequisites for creating a cross tenancy Autonomous Data Guard standby. - Add a Cross Tenancy Autonomous Data Guard Standby
Shows the steps to create a cross tenancy Autonomous Data Guard standby. This covers creating a cross tenancy standby when the source database and the standby database are in the same region (local) and when the source database and the standby database are in different regions (cross-region). - Switchover, Failover, or Create a Snapshot Standby with a Cross Tenancy Autonomous Data Guard Standby
Describes the procedure to switchover, failover, or create a snapshot standby with a cross tenancy standby. - Terminate a Cross Tenancy Autonomous Data Guard Standby
Shows the steps to terminate a cross tenancy standby.
About Cross Tenancy Autonomous Data Guard
When you add a cross tenancy Autonomous Data Guard standby, Autonomous Database provisions a standby database in a remote tenancy.
With a cross tenancy Autonomous Data Guard standby you can failover or switchover to a standby database in a different tenancy (or create a snapshot standby in a different tenancy). This feature also allows you to easily use an Autonomous Data Guard standby to migrate a database to a different tenancy.
Note the following for adding a cross tenancy Autonomous Data Guard standby:
-
You can only create a cross tenancy Autonomous Data Guard standby using the CLI or the Autonomous Database REST APIs. This option is not available using the Oracle Cloud Infrastructure Console.
-
Some of the features available when you enable an Autonomous Data Guard standby in the same tenancy, such as the automatic failover options, are not available with a cross tenancy Autonomous Data Guard standby.
There are no automatic failover options for a cross tenancy Autonomous Data Guard standby and you can only use manual failover to failover to a cross tenancy standby.
-
You can enable a cross tenancy Autonomous Database standby with either the ECPU or OCPU compute model. The standby database uses the same compute model as the primary database.
-
A cross tenancy Autonomous Data Guard standby can be in the same region (local) or in a different region (cross-region).
-
Only a single cross tenancy Autonomous Data Guard standby can be enabled, either local or cross-region. You cannot enable both a cross tenancy local and a cross tenancy cross-region Autonomous Data Guard standby.
- In addition to a single cross tenancy Autonomous Data Guard standby, you can have one local or cross-region disaster recovery peer (either Autonomous Data Guard or Backup-Based Disaster Recovery).
-
Customer-Managed Encryption Keys are not supported with a Cross Tenancy Autonomous Data Guard standby.
Prerequisites to Create a Cross Tenancy Autonomous Data Guard Standby
Describes prerequisites for creating a cross tenancy Autonomous Data Guard standby.
You must define OCI Identity and Access Management policies to authorize creating an Autonomous Data Guard standby in a different tenancy.
The OCI Identity and Access Management groups and policies you add support the following:
-
A member of a group in the source tenancy allows a group in the destination tenancy to access (read) the source Autonomous Database instance on the source tenancy.
You do not need to allow other actions on the source Autonomous Database instance (for example, start, stop terminate, or any write operations).
-
A member of a group in the destination tenancy is allowed to read Autonomous Databases in the source tenancy.
On the destination tenancy you also add a policy that allows a group to manage the Autonomous Databases in a compartment in the remote (destination) tenancy. For example, this policy allows the group to create the standby database.
- Create a group on the remote tenancy that contains the user
that will be allowed to add the Autonomous Data
Guard standby.
- On the source tenancy, define OCI Identity and Access Management policies for the source Autonomous Database instance.
- Define policies for the remote tenancy.
If these polices are revoked, creating a cross tenancy Autonomous Data Guard Standby is no longer allowed.
See Getting Started with Policies for more information.
Add a Cross Tenancy Autonomous Data Guard Standby
Shows the steps to create a cross tenancy Autonomous Data Guard standby. This covers creating a cross tenancy standby when the source database and the standby database are in the same region (local) and when the source database and the standby database are in different regions (cross-region).
You can only create a cross tenancy Autonomous Data Guard standby using the CLI or the Autonomous Database REST APIs. This option is not available using the Oracle Cloud Infrastructure Console.
First, perform the prerequisite steps to define the OCI Identity and Access Management policies to authorize cross tenancy Autonomous Data Guard.
See Prerequisites to Create a Cross Tenancy Autonomous Data Guard Standby for details.
To create a local (same region) cross tenancy Autonomous Data Guard standby:
The API call to create the standby is sent to the different tenancy in the local region.
To create a remote (cross-region) cross tenancy Autonomous Data Guard standby:
The API call to create the standby runs in the different tenancy in the source region.
-
Copy the OCID of the Primary database (on the primary's Tenancy).
-
Access the tenancy where you want to create the standby, the remote tenancy in the remote region, and use the CLI or the REST API to create the standby database.
For example, with the CLI:
oci db autonomous-database create-adb-cross-region-data-guard-details --compartment-id ocid1.tenancy.oc1..fcue4_example --source-id ocid1.autonomousdatabase.oc1.ap-mumbai-1.anrg6example2vws3q --disaster-recovery-type ADG
See update for more information.
See UpdateAutonomousDatabase for more information.
Notes for adding a cross tenancy standby database:
-
Autonomous Database generates the Enable cross-region disaster recovery work request. To view the request, under Resources click Work requests.
-
After you add a cross tenancy standby database either local or cross-region, the wallet and connection string from the primary database will contain only the hostname of the primary database, and the wallet and connection string from the remote tenancy database will contain only the hostname of the remote tenancy database. This applies for both instance and regional wallets.
See Cross-Region Disaster Recovery Connection Strings and Wallets for more information.
-
While you add a standby database and the Lifecycle State shows Updating, the following actions are disabled for the primary database:
-
Move Resource. See Move an Autonomous Database to a Different Compartment for information on moving an instance.
-
Stop. See Stop Autonomous Database for information on stopping an instance.
-
Restart. See Restart Autonomous Database for information on restarting an instance.
-
Restore. See Restore and Recover your Autonomous Database for information on restoring.
-
-
See Cross-Region Autonomous Data Guard Notes and Notes for Customer-Managed Keys in OCI Vault with Autonomous Data Guard for information on using customer-managed keys and for additional notes for using Autonomous Data Guard with the standby in a different tenancy.
Switchover, Failover, or Create a Snapshot Standby with a Cross Tenancy Autonomous Data Guard Standby
Describes the procedure to switchover, failover, or create a snapshot standby with a cross tenancy standby.
-
Switchover: The steps to perform a switchover to a cross tenancy standby are the same whether the standby is local (same region) or in a different region (cross-region). You follow the same steps as for a switchover to a same tenancy cross-region standby. See Perform a Switchover to a Cross-Region Standby for more information.
-
Failover: The steps to perform a failover to a cross tenancy standby are the same whether the standby is local (same region) or in a different region (cross-region). You follow the same steps as for a manual failover to a same tenancy cross-region standby. See Perform Manual Failover to a Cross-Region Standby Database for more information.
-
Create a Snapshot Standby: The steps to create a snapshot standby with a cross tenancy standby are the same whether the cross tenancy standby is local (same region) or in a different region (cross-region). You follow the same steps as with a same tenancy cross-region standby. See Convert Cross-Region Disaster Recovery Peer to a Snapshot Standby for more information.
Terminate a Cross Tenancy Autonomous Data Guard Standby
Shows the steps to terminate a cross tenancy standby.
The steps to terminate either a same region or a cross-region cross tenancy standby are the same as those to terminate a cross-region same-tenancy standby. See Terminate a Cross-Region Standby Database for more information.