Administering a Data Guard Configuration
Note:
Oracle Database Classic Cloud Service does not currently include the fast-start failover (FSFO) feature of Oracle Data Guard. In Database Classic Cloud Service, you perform failover operations manually, as described in Performing a Manual Failover Operation.
Checking the Status of the Oracle Data Guard Configuration
Note:
This topic does not apply to database deployments using both Oracle RAC and Oracle Data Guard. For such deployments, use the raccli status dataguard
command to check the status of the deployment.
You can use the dataguard status
subcommand of the dbaascli
utility to check the status of your Oracle Data Guard configuration.
Before performing certain operations, you may want to check the status of your Oracle Data Guard configuration.
To check the status of the Oracle Data Guard configuration by using thedataguard status
subcommand:
Performing a Switchover Operation
You can perform a switchover to the standby database in your Oracle Data Guard configuration by using the Oracle Database Classic Cloud Service console or, if desired, by using one of the ways listed in Other Ways to Perform a Switchover Operation at the end of this topic.
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 Classic Cloud Service Console
-
Go to the Overview page for the database deployment you want to perform a switchover on:
-
Open the Oracle Database Classic Cloud Service console.
For detailed instructions, see Accessing the Oracle Database Classic Cloud Service Console.
-
In the list of deployments, click the name of the database deployment you want to perform the switchover on.
The Oracle Database Classic Cloud Service Overview page is displayed.
-
-
To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.
-
From the action menu () 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 Classic Cloud Service console until the switchover is complete.
-
Refresh the page occasionally.
Database Role will be updated to reflect the new role for each database.
Note:
For Data Guard configurations of two Oracle RAC databases, you must manually configure backups after the switchover operation completes. For instructions, see Manual backup configuration required after switchover or failover on Oracle RAC plus Data Guard deployments in Known Issues for Oracle Database Classic Cloud Service.
Other Ways to Perform a Switchover Operation
-
For Data Guard configurations of two single-instance databases, you can use the
dataguard switchover
subcommand of thedbaascli
utility. See Performing a Switchover Operation by Using the dbaascli Utility. -
For Data Guard configurations of two Oracle RAC databases, you can use the
raccli switchover dataguard
command.
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 Classic Cloud Service console or, if desired, by using one of the ways listed in Other Ways to Perform a Manual Failover Operation at the end of this topic.
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 Classic Cloud Service Console
-
Go to the Overview page for the database deployment you want to perform the failover on:
-
Open the Oracle Database Classic Cloud Service console.
For detailed instructions, see Accessing the Oracle Database Classic Cloud Service Console.
-
In the list of deployments, click the name of the database deployment you want to perform the failover on.
The Oracle Database Classic Cloud Service Overview page is displayed.
-
-
To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.
-
From the action menu () 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 Classic Cloud Service console until the operation is complete.
-
Refresh the page occasionally.
Database Role will be updated to reflect the new role for each database.
Note:
For Data Guard configurations of two Oracle RAC databases, you must manually configure backups after the failover operation completes. For instructions, see Manual backup configuration required after switchover or failover on Oracle RAC plus Data Guard deployments in Known Issues for Oracle Database Classic Cloud Service.
Other Ways to Perform a Manual Failover Operation
-
For Data Guard configurations of two single-instance databases, you can use the
dataguard failover
subcommand of thedbaascli
utility. See Performing a Manual Failover Operation by Using the dbaascli Utility. -
For Data Guard configurations of two Oracle RAC databases, you can use the
raccli failover dataguard
command.
Reinstating a Failed Primary Database
You can reinstate a failed primary database after a failover by using the Oracle Database Classic Cloud Service console or, if desired, by using one of the ways listed in Other Ways to Reinstate a Failed Primary Database at the end of this topic.
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 Classic Cloud Service Console
-
Go to the Overview page for the database deployment you want to perform the reinstate on:
-
Open the Oracle Database Classic Cloud Service console.
For detailed instructions, see Accessing the Oracle Database Classic Cloud Service Console.
-
In the list of deployments, click the name of the database deployment you want to perform the reinstate on.
The Oracle Database Classic Cloud Service Overview page is displayed.
-
-
To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.
-
From the action menu () located beside the deployment name , select Reinstate, and then confirm the action.
The deployment has a status of Maintenance in the Oracle Database Classic Cloud Service console until the operation is complete.
-
Refresh the page occasionally.
Database Role will be updated to reflect the new role for each database.
Other Ways to Reinstate a Failed Primary Database
-
For Data Guard configurations of two single-instance databases, you can use the
dataguard reinstate
subcommand of thedbaascli
utility. See Reinstating a Failed Primary Database by Using the dbaascli Utility. -
For Data Guard configurations of two Oracle RAC databases, you can use the
raccli reinstate dataguard
command.
Reinstating a Failed Primary Database by Using the dbaascli Utility
You can use the dataguard reinstate
subcommand of the dbaascli
utility to reinstate a failed primary database after a failover.
To determine whether the database can be reinstated, use the dataguard status
subcommand as described in Checking the Status of the Oracle Data Guard Configuration. A status of ORA-16661: the standby database needs to be reinstated
indicates the standby database can be reinstated.
dataguard reinstate
subcommand:
Changing the SYS Password
Note:
This topic does not apply to database deployments using both Oracle RAC and Oracle Data Guard. Such deployments do not include the dbaascli
utility.
You can use the database changepassword
subcommand of the dbaascli
utility to change the password of the SYS
user in your Oracle Data Guard configuration.
To use the database changepassword
subcommand of the dbaascli
utility:
Configuring Clients for Automatic Failover
Note:
This topic does not apply to database deployments using both Oracle RAC and Oracle Data Guard.
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 Classic 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:
-
SID_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.
-
SID_dg_ro: If the Data Guard configuration includes a standby database with real-time query (Active Data Guard), this service is defined and 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, that includes a standby database with real-time query (Active Data Guard), 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.