Administering a Data Guard Configuration

Oracle Database Exadata Cloud Service provides several commands and features to simplify the administration of database deployments that contain an Oracle Data Guard configuration.

Performing a Switchover Operation

You can perform a switchover to the standby database in your Oracle Data Guard configuration by using the Oracle Database Cloud Service console.

A switchover operation enables the primary database to switch roles with the standby database. There is no data loss during a switchover. After a switchover, each database continues to participate in the Oracle Data Guard configuration in its new role. A switchover is typically used to reduce primary database downtime during planned outages, such as operating system or hardware upgrades, or rolling upgrades of the Oracle Database software and patch sets. For more information, see "Switchovers" in Oracle Data Guard Concepts and Administration for Release 18, 12.2, 12.1 or 11.2.

Performing a Switchover Operation by Using the Oracle Database Cloud Service Console

  1. Go to the Overview page for the database deployment you want to perform a switchover on:

    1. Open the Oracle Database Cloud Service console.

      For detailed instructions, see Accessing the My Services Dashboard and the Oracle Database Cloud Service Console.

    2. In the list of deployments, click the name of the database deployment you want to perform the switchover on.

      The Oracle Database Cloud Service Overview page is displayed.

  2. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

  3. From the action menu (Menu icon) located beside the deployment name or beside any of the compute nodes, select Switchover, and then confirm the action.

    The deployment shows a status of Maintenance in the Oracle Database Cloud Service console until the switchover is complete.

  4. Refresh the page occasionally.

    Database Role will be updated to reflect the new role for each database.

Performing a Manual Failover Operation

You can perform a manual failover to the standby database in your Oracle Data Guard configuration by using the Oracle Database Cloud Service console.

A failover operation changes the standby database to the primary role in response to a primary database failure. If the primary database was not operating in either maximum protection mode or maximum availability mode before the failure, some data loss may occur. If Flashback Database is enabled on the primary database, it can be reinstated as a standby for the new primary database once the reason for the failure is corrected. A failover is typically used only when the primary database becomes unavailable, and there is no possibility of restoring it to service within a reasonable period of time. For more information, see "Failovers" in Oracle Data Guard Concepts and Administration for Release 18, 12.2, 12.1 or 11.2.

Performing a Manual Failover Operation by Using the Oracle Database Cloud Service Console

  1. Go to the Overview page for the database deployment you want to perform the failover on:

    1. Open the Oracle Database Cloud Service console.

      For detailed instructions, see Accessing the My Services Dashboard and the Oracle Database Cloud Service Console.

    2. In the list of deployments, click the name of the database deployment you want to perform the failover on.

      The Oracle Database Cloud Service Overview page is displayed.

  2. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

  3. From the action menu (Menu icon) located beside the deployment name or beside any of the compute nodes, select Failover, and then confirm the action.

    The deployment shows a status of Maintenance in the Oracle Database Cloud Service console until the operation is complete.

  4. Refresh the page occasionally.

    Database Role will be updated to reflect the new role for each database.

Reinstating a Failed Primary Database

You can reinstate a failed primary database after a failover by using the Oracle Database Cloud Service console.

After performing a failover to the standby database, you may be able to restore your original disaster-recovery solution by reinstating the failed primary database. You can use the Data Guard broker's reinstate capability to make the failed primary database a viable standby database for the new primary. For more information, see "Reenabling Disabled Databases After a Role Change" in Oracle Data Guard Broker for Release 18, 12.2, 12.1 or 11.2.

Reinstating a Failed Primary Database by Using the Oracle Database Cloud Service Console

  1. Go to the Overview page for the database deployment you want to perform the reinstate on:

    1. Open the Oracle Database Cloud Service console.

      For detailed instructions, see Accessing the My Services Dashboard and the Oracle Database Cloud Service Console.

    2. In the list of deployments, click the name of the database deployment you want to perform the reinstate on.

      The Oracle Database Cloud Service Overview page is displayed.

  2. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

  3. From the action menu (Menu icon) located beside the deployment name or beside any of the primary database’s compute nodes, select Reinstate, and then confirm the action.

    The deployment has a status of Maintenance in the Oracle Database Cloud Service console until the operation is complete.

  4. Refresh the page occasionally.

    Database Role will be updated to reflect the new role for each database.

Configuring Clients for Automatic Failover

By using pre-defined network service names, application clients can automatically reconnect to a new primary database following a role transition.

Your Data Guard configuration on Oracle Database Exadata Cloud Service is pre-configured to provide automatic transition of application connections from a failed primary database to a new primary database after a Data Guard role transition has taken place.

The following network service names are pre-defined:

  • dbname_dg: This service is used to connect to the primary database. If the database uses Oracle Database 12c Release 1, or later, this service connects to the root container.

  • dbname_dg_ro: This service is used to connect to the standby database. If the database uses Oracle Database 12c Release 1, or later, this service connects to the root container.

  • PDBname_dg: In an Oracle Data Guard configuration using Oracle Databases 12c Release 1, or later, this service is defined and is used to connect to the default PDB of the primary database.

  • PDBname_dg_ro: In an Oracle Data Guard configuration using Oracle Databases 12c Release 1, or later, this service is defined and is used to connect to the default PDB of the standby database.

The services are managed on each database through the use of pre-defined triggers. Following a role transition, the trigger is fired to start the services on the new primary database. By using the pre-defined network service names in your application connections, your application clients will be automatically directed to the new primary database following a role transition.

See Client Failover Best Practices for Highly Available Oracle Databases: Oracle Database 11g Release 2 or Client Failover Best Practices for Highly Available Oracle Databases Oracle Database 12c for detailed information.