Note:

Create Multiple Standby Databases for Oracle Exadata Database Service on Dedicated Infrastructure and Oracle Exadata Database Service on Cloud@Customer

Introduction

Users will now be able to configure multiple local and remote standby databases for a primary database through Oracle Cloud Infrastructure (OCI) Console/API/SDK, and Terraform.

Objectives

Task 1: Add More Than One Standby Database to an Existing Oracle Data Guard Configuration

To add more than one standby database to an Oracle Data Guard configuration through cloud automation, you will need to switch to the new Oracle Data Guard group resource, which can be done at any time. The new Oracle Data Guard group resource consists of the new API and associated user interfaces.

You can switch from the existing Oracle Data Guard association to the new Oracle Data Guard group resource using two methods.

Note: All existing Oracle Data Guard configurations and database backup/restore capabilities created with cloud automation will be preserved. However, if you have manually configured Oracle Data Guard or multiple standby databases, they will not be known or supported with cloud automation. You will need to recreate those configurations using the new Oracle Data Guard group resource.

  1. Log in to the OCI Console, navigate to Oracle Database and click Oracle Exadata Database Service on Dedicated Infrastructure.

    Image showing OCI Console Navigation

  2. Navigate to the cloud VM cluster that contains the primary database of an existing Oracle Data Guard configuration for which you want to add more than one standby database.

  3. In the Database Details page, under Resources, select Data Guard Associations and click Switch to new resource to be taken to the migration workflow.

    Image showing switch to new resource

    Or

    Click Add standby to be taken to the migration workflow.

    Image showing add standby

  4. Click Start to confirm migration to the new Data Guard group resource.

    Image showing start new data guard group resource

    Once the migration is complete, the Data Guard group details are displayed. At this time, users are able to add additional standby databases.

    Image showing migrated data guard group

Task 2: Create a Standby Database using the new Data Guard Group Configuration

Note: If you are creating a new Oracle Data Guard configuration, it is recommended that you select the new Data Guard group resource to add the first standby. This will allow you to add additional standby databases in future.

  1. Go to the Database Details page of the primary database, under Resources, select Data Guard Associations and click Add standby.

    Image showing add standby

  2. In the Add standby page, select Use the new Data Guard group resource and enter the following information.

    This provides the ability to associate multiple standby databases to a primary database.

    • Peer region: Select a peer region. This is the region where the standby database will reside.
    • Select availability domain: Select an availability domain. This is the availability domain within the target region.
    • Select Exadata infrastructure and peer VM cluster.
    • Enter additional details for Data Guard type, Database Home, Database Name and Database credentials.

    Image showing add standby using new api flow

  3. Click Add standby.

    Image showing add standby using new api flow

    The Oracle Data Guard group is created, and the details are displayed.

    Note: Information for all the member databases in the Oracle Data Guard group will be shown. This allows the user to view all the standby databases for a given database in one place.

    Image showing updating status for data guard group creation

    Image showing available status for data guard group creation

    If you navigate to the Database Details page of the standby database, you will see identical information for the Oracle Data Guard group.

    Image showing information about data guard group from the standby database

  4. To create additional standby databases, click Add standby on the primary Database Details page and enter the required details to create a standby database.

    Note: Information for all the member databases of the Oracle Data Guard group is displayed on both the primary and all of the standby database pages.

    Image showing information for all the member databases of the data guard group

    Image showing information for all the member databases of the data guard group

Task 3: Modify the Oracle Data Guard Member Settings

  1. Go to the Database Details page of the database, under Resources, click Data Guard group.

    A list of databases that are members of the Oracle Data Guard group is displayed with the Data Guard type you have chosen for each Oracle Data Guard group member.

    To edit Oracle Data Guard group details, click the three dots, and then click Edit.

    Image showing add standby

  2. Select the updated values for Data Guard type, Protection mode, Transport type and click Edit Data Guard.

    Image showing edit data guard group

Task 4: Perform an Oracle Data Guard Switchover Operation

Users can perform a switchover between the primary database and any of the standby databases in the Oracle Data Guard group. In the new Oracle Data Guard group model, both the switchover and failover operations can be initiated from any of the standby databases.

  1. Go to the Database Details page of the database, under Resources, click Data Guard group.

    Image showing data guard group

  2. Select the standby database in the Oracle Data Guard group on which you want to perform a switchover. Click the three dots, and then click Switchover.

    Image showing switchover

  3. Enter database admin password and click Switchover to initiate a role reversal between the selected databases.

    Image showing switchover db admin password

    Upon switchover, the two databases that are part of the switchover operation will reflect the new database roles.

    Image showing after switchover

Task 5: Perform an Oracle Data Guard Failover Operation

You can perform a failover between the primary database and any of the standby databases in the Oracle Data Guard group. In the new Oracle Data Guard group model, both the switchover and failover operations can be initiated from any of the standby databases.

  1. Select the standby database in the Oracle Data Guard group on which you want to perform a failover. Click the three dots, and then click Failover.

    Image showing before failover

  2. Enter database admin password and click Failover to initiate a failover to a new primary database.

    Image showing failover db admin password

    Upon failover, the selected standby database will become the new primary database in the Oracle Data Guard group. The original primary database will now have a Disabled Standby role.

    Image showing after failover

Task 6: Reinstate a Standby Database in a Disabled Standby Role

You can reinstate a standby database that has a Disabled Standby role.

  1. For the Oracle Data Guard group on which you want to reinstate this database, click the three dots, and then click Reinstate.

    Image showing before reinstate

  2. Enter database admin password and click Reinstate.

    Image showing reinstate db admin password

    The disabled standby database will be reinstated and will assume the role of a standby database in the Oracle Data Guard group.

    Image showing after reinstate

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.