Configure and Manage Autonomous Data Guard
The Autonomous Data Guard feature of Autonomous Database on Dedicated Exadata Infrastructure enables you to keep your critical production databases available to mission critical applications despite failures, disasters, human error, or data corruption. This kind of capability is often called disaster recovery.
- Enable Autonomous Data Guard on an Autonomous Container Database
You can enable Autonomous Data Guard from the Details page of an Autonomous Container Database. - View the Status of an Autonomous Data Guard Configuration
- Switch Roles in an Autonomous Data Guard Configuration
- Fail Over to the Standby in an Autonomous Data Guard Configuration
- Reinstate the Disabled Standby in an Autonomous Data Guard Configuration
- Update Autonomous Data Guard Settings
You can update the settings of an Autonomous Data Guard from the Details page of the primary Autonomous Container Database in the configuration. - Convert Physical Standby to Snapshot Standby
You can convert a standby Autonomous Container Database to a snapshot standby in an Autonomous Data Guard setup from the Details page of the standby Autonomous Container Database in the configuration. - Convert Snapshot Standby to Physical Standby
You can convert a snapshot standby Autonomous Container Database to a physical standby in an Autonomous Data Guard setup from the Details page of the standby Autonomous Container Database in the configuration. - Add a Cross Tenancy Standby Database
You can add an Autonomous Data Guard standby database that resides in a tenancy different from the primary database.
Parent topic: Create and Manage Autonomous Container Databases
Enable Autonomous Data Guard on an Autonomous Container Database
You cannot enable Autonomous Data Guard on an ACD with an active maintenance run scheduled within the next two weeks.
Required IAM Permissions
inspect cloud-autonomous-vmclusters
use autonomous-container-databases
Procedure
When an add standby ACD operation is in progress:
-
Any scheduled maintenance on that ACD will not begin until the add standby operation is complete.
-
The primary ACD and its associated Autonomous Databases will have a downtime due to automatic non-rolling restart.
Parent topic: Configure and Manage Autonomous Data Guard
View the Status of an Autonomous Data Guard Configuration
You view the status of an Autonomous Data Guard configuration from the Details page of the primary or standby Autonomous Container Database in the configuration.
Required IAM Policies
inspect autonomous-container-databases
Procedure
-
Go to the Details page of the primary or standby Autonomous Container Database in the Autonomous Data Guard configuration.
For instructions, see View Details of an Autonomous Container Database.
You can view the Autonomous Data Guard details such as its status, peer role, peer state, protection mode, and automatic failover setting under the Autonomous Data Guard section on the Autonomous Container Database Information tab.
-
You can also view the Autonomous Data Guard details in the side menu, under Resources by clicking Autonomous Data Guard Associations.
The Autonomous Data Guard table displays information about the peer container database, the current apply lag and transport lag, state, and last role change and creation dates.
Parent topic: Configure and Manage Autonomous Data Guard
Switch Roles in an Autonomous Data Guard Configuration
You switch the roles of the primary and standby Autonomous Container Databases in an Autonomous Data Guard configuration from the Details page of the primary or standby Autonomous Container Database.
Required IAM Policies
use autonomous-container-databases
Procedure
-
Go to the Details page of the primary or standby Autonomous Container Database in the Autonomous Data Guard configuration.
For instructions, see View Details of an Autonomous Container Database.
Note
You can not switch roles of the primary and standby Autonomous Container Databases in an Autonomous Data Guard configuration where the standby is in the snapshot standby role. -
In the side menu, under Resources, click Autonomous Data Guard Associations.
-
In the Created column of the table showing Autonomous Data Guard associations, click the ellipsis icon and then click Switchover.
Oracle Autonomous Database on Dedicated Exadata Infrastructure sets the statuses of both container databases to Role Change in Progress... and begins the switchover operation, which causes the primary container database to assume the standby role and the standby container database to assume the primary role. Upon completion, the statuses of both container databases returns to Active.Note
In case of cross region Data Guard with Customer Managed Keys, the replicated vault used by the standby is read-only. So, when the standby assumes the primary role from a failover, you cannot create a new Pluggable Database or rotate the key.
Parent topic: Configure and Manage Autonomous Data Guard
Fail Over to the Standby in an Autonomous Data Guard Configuration
You fail over to the standby Autonomous Container Databases in an Autonomous Data Guard configuration from the Details page of the standby Autonomous Container Database.
Required IAM Policies
use autonomous-container-databases
Procedure
-
Go to the Details page of the standby Autonomous Container Database in the Autonomous Data Guard configuration.
For instructions, see View Details of an Autonomous Container Database.
-
In the side menu, under Resources, click Autonomous Data Guard Associations.
-
In the Created column of the table showing Autonomous Data Guard associations, click the ellipsis icon and then click Failover.
-
In case of a snapshot standby Autonomous Container Database, you see a message alerting you that the snapshot standby will be converted to physical standby after discarding all its local updates and applying data from your primary database. Click Failover to proceed.
Oracle Autonomous Database on Dedicated Exadata Infrastructure sets the status of the Standby container database to Role Change in Progress and begins the failover operation. Upon completion, the role of the Standby container database becomes Primary and the role of the Primary container database becomes Disabled Standby with the Unavailable state.
Note
In case of cross region Data Guard with Customer Managed Keys, the replicated vault used by the standby is read-only. So, when the standby assumes the primary role from a failover, you cannot create a new Pluggable Database or rotate the key.
Parent topic: Configure and Manage Autonomous Data Guard
Reinstate the Disabled Standby in an Autonomous Data Guard Configuration
After a failover has occurred and the failed primary Autonomous Container Database assumes a disabled, standby role, you can reinstate the failed database to an enabled, standby role from its Details page.
Required IAM Policies
use autonomous-container-databases
Procedure
-
Go to the Details page of the disabled standby Autonomous Container Database that you want to reinstate.
Tip:
The primary database that you failed over is labeled as "Disabled Standby" in the list of Autonomous Container Databases for a compartment.For instructions, see View Details of an Autonomous Container Database.
-
In the Resources section, click Autonomous Data Guard Associations to display a list of peer databases for the primary database you are managing.
-
For the Autonomous Container Database you are reinstating, click the ellipsis in the Created column, and click Reinstate.
The states of the peer databases become Role Change in Progress... until the reinstate action is complete. Upon completion, the role of the Disabled Standby container database becomes Standby and its state changes to Available.
Parent topic: Configure and Manage Autonomous Data Guard
Update Autonomous Data Guard Settings
You can update the settings of an Autonomous Data Guard from the Details page of the primary Autonomous Container Database in the configuration.
Required IAM Policies
use autonomous-container-databases
Parent topic: Configure and Manage Autonomous Data Guard
Convert Physical Standby to Snapshot Standby
You can convert a standby Autonomous Container Database to a snapshot standby in an Autonomous Data Guard setup from the Details page of the standby Autonomous Container Database in the configuration.
Required IAM Policies
use autonomous-container-databases
Procedure
Parent topic: Configure and Manage Autonomous Data Guard
Convert Snapshot Standby to Physical Standby
You can convert a snapshot standby Autonomous Container Database to a physical standby in an Autonomous Data Guard setup from the Details page of the standby Autonomous Container Database in the configuration.
Required IAM Policies
use autonomous-container-databases
Procedure
Parent topic: Configure and Manage Autonomous Data Guard
Add a Cross Tenancy Standby Database
APPLIES TO: Oracle Public Cloud only
Required IAM Policies
To create a cross tenancy standby database, you must ensure to meet the following requirements:
-
Run the CLI or API commands to add the cross tenancy standby database in the destination tenancy.
-
Define OCI Identity and Access Management groups and policies on the source and destination tenancies so that you can run commands to add the cross tenancy standby database in the destination tenancy and allow the destination tenancy to contact the source tenancy where the primary database resides. When these polices are revoked, adding a cross tenancy standby database will not be allowed.
-
On the destination tenancy, create a group (for example: DestinationGroup), and add the user(s) who will be allowed to add a cross tenancy standby database to this group. See Using the Console to Create a Group for guidance.
-
On the source tenancy, create IAM policies to allow the group created in the destination tenancy (DestinationGroup) to add a cross tenancy standby database using the primary database from the source tenancy. See Using the Console to Create a Policy for guidance.
For example, you can define a policy to allow a user in theDestinationGroup
of theDestinationTenancy
read from a specific Autonomous Database instance in the specified compartment on the source tenancy as shown below:define tenancy DestinationTenancy as ocid1.tenancy.oc1..unique_ID define group DestinationGroup as ocid1.group.region1..unique_ID admit group DestinationGroup of tenancy DestinationTenancy to manage autonomous-database-family in tenancy
Note
The policy only needs to allow read access on the source Autonomous Database instance to create a cross tenancy clone.The above policy specifies the following:- Line 1: OCID of the destination tenancy where you are going to add the standby database.
- Line 2: OCID of the destination group to which the user who will create cross tenancy standby database belongs.
- Line 3: OCID of the compartment where the primary database resides and the OCID of the primary database.
-
On the destination tenancy, create IAM policies to endorse a group to manage the primary database source on the source tenancy. See Using the Console to Create a Policy for guidance.
For example:define tenancy SourceTenancy as ocid1.tenancy.oc1..unique_ID endorse group DestinationGroup to manage autonomous-database-family in tenancy SourceTenancy
The above policy specifies the following:- Line 1: OCID of the source tenancy OCID where the primary database resides.
- Line 2: Specifies the destination group that can be allowed to manage Autonomous Databases in the source tenancy.
This policy discussed in the above example allows
DestinationGroup
to create Autonomous Databases and cross tenancy standby databases in the source tenancy. See IAM Permissions and API Operations for Autonomous Database for more information and examples.
-
To add a local (same region) cross tenancy standby database:
On the tenancy where you want to add the standby database, that is, on the destination tenancy, use the CLI or call the REST API and provide the OCID of the primary database, where the primary database resides in a different tenancy (the source tenancy).
oci db autonomous-container-database create --cloud-autonomous-vm-cluster-id ocid1.cloudautonomousvmcluster.oc1.iad.unique_ID --compartment-id ocid1.compartment.oc1..unique_ID --display-name clicrosdg --patch-model RELEASE_UPDATES --peer-autonomous-container-database-compartment-id ocid1.compartment.oc1..unique_ID --peer-autonomous-container-database-display-name clisecdg --peer-cloud-autonomous-vm-cluster-id ocid1.autonomousexainfrastructure.oc1.iad.unique_ID --protection-mode MAXIMUM_PERFORMANCE --service-level-agreement-type AUTONOMOUS_DATAGUARD
Once the command succeeds a work-request-id will be returned which can be used to track the progress of the standby database. See autonomous-container-database for more information.
For information about SDKs, see Software Development Kits and Command Line Interface.
To add a cross tenancy standby database residing in the same region as the primary database using REST API, use AutonomousContainerDatabases
.
The API call to create the standby is sent to the different tenancy in the local region.
oci raw-request --http-method POST --target-uri https://database.us-ashburn-1.oraclecloud.com/20160918/autonomousContainerDatabases --request-body '{
"cloudAutonomousVmClusterId": "ocid1.cloudautonomousvmcluster.oc1..unique_ID",
"compartmentId": "ocid1.compartment.oc1..unique_ID",
"displayName": "cliapcrdg",
"patchModel": "RELEASE_UPDATES",
"peerAutonomousContainerDatabaseCompartmentId": "ocid1.compartment.oc1..unique_ID",
"peerAutonomousContainerDatabaseDisplayName": "cliapscdg",
"peerCloudAutonomousVmClusterId": "ocid1.autonomousexainfrastructure.oc1.iad.unique_ID",
"protectionMode": "MAXIMUM_PERFORMANCE",
"serviceLevelAgreementType": "AUTONOMOUS_DATAGUARD",
}'
See AutonomousContainerDatabase for additional information on the REST API.
For information about using the API and signing requests, see REST APIs and Security Credentials.
To create a remote (cross-region) cross tenancy standby database:
On the tenancy where you want to add the standby database, that is, on the destination tenancy in the destination region, use the CLI or call the REST API and provide the OCID of the primary database, where the primary database resides in a different tenancy and different region.
oci db autonomous-container-database create --cloud-autonomous-vm-cluster-id ocid1.cloudautonomousvmcluster.oc1.ap-chuncheon-1.unique_ID --compartment-id ocid1.compartment.oc1..unique_ID --display-name clicrosdg --patch-model RELEASE_UPDATES --peer-autonomous-container-database-compartment-id ocid1.compartment.oc1..unique_ID --peer-autonomous-container-database-display-name clisecdg --peer-cloud-autonomous-vm-cluster-id ocid1.autonomousexainfrastructure.oc1.iad.unique_ID --protection-mode MAXIMUM_PERFORMANCE --service-level-agreement-type AUTONOMOUS_DATAGUARD
Once the command succeeds a work-request-id will be returned which can be used to track the progress of the standby database. See autonomous-container-database for more information.
For information about SDKs, see Software Development Kits and Command Line Interface.
To add a cross tenancy standby database residing in a different region from the primary database using REST API, use AutonomousContainerDatabases
.
The API call to create the standby runs in the different tenancy in the source region.
oci raw-request --http-method POST --target-uri https://database.ap-chuncheon-1.oraclecloud.com/20160918/autonomousContainerDatabases --request-body '{
"cloudAutonomousVmClusterId": "ocid1.cloudautonomousvmcluster.oc1.ap-chuncheon-1.unique_ID",
"compartmentId": "ocid1.compartment.oc1..unique_ID",
"displayName": "cliapcrdg",
"patchModel": "RELEASE_UPDATES",
"peerAutonomousContainerDatabaseCompartmentId": "ocid1.compartment.oc1..unique_ID",
"peerAutonomousContainerDatabaseDisplayName": "cliapscdg",
"peerCloudAutonomousVmClusterId": "ocid1.autonomousexainfrastructure.oc1.iad.unique_ID",
"protectionMode": "MAXIMUM_PERFORMANCE",
"serviceLevelAgreementType": "AUTONOMOUS_DATAGUARD",
}'
See AutonomousContainerDatabase for additional information on the REST API.
For information about using the API and signing requests, see REST APIs and Security Credentials.
After submitting a request to add a cross tenancy standby database. the database Lifecycle State shows Updating. You cannot stop, start, restart, restore or move the Autonomous Database in this state.
Parent topic: Configure and Manage Autonomous Data Guard