Data Guard Management
This section focuses on managing Oracle Data Guard configurations and operations. It includes commands like dbaascli dataguard prepareStandbyBlob to generate a blob file for setting up a standby site, and dbaascli dataguard updateDGConfigAttributes to update Data Guard automation attributes across all cluster nodes. These commands streamline the setup and maintenance of Data Guard environments for high availability and disaster recovery.
- dbaascli dataguard prepareStandbyBlob
- dbaascli dataguard updateDGConfigAttributes
- dbaascli dataguard failover
- dbaascli dataguard reinstate
- dbaascli dataguard switchover
- dbaascli dataguard prepareForStandby
- dbaascli dataguard configureStandby
- dbaascli dataguard registerStandby
- dbaascli dataguard deregisterStandby
- dbaascli dataguard configureAWR
- dbaascli dataguard updateConfiguration
dbaascli dataguard prepareStandbyBlob
To generate a blob file containing various files that are required on the standby site in case of a dataguard environment, use the dbaascli dataguard prepareStandbyBlob command.
Run the command as the root or oracle user.
Syntax:
dbaascli dataguard prepareStandbyBlob --dbname <value> --blobLocation <value>
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name |
--blobLocation |
specifies the custom directory location where the standby blob file will be generated in a Data Guard environment |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli dataguard prepareStandbyBlob command?
A: The dbaascli dataguard prepareStandbyBlob command is used to generate a blob file containing various files required on the standby site in a Data Guard environment.
Q: What are the prerequisites for running the dbaascli dataguard prepareStandbyBlob command?
A: The command should be run as the root or oracle user.
Q: How do I specify the name of the Oracle AI Database for which I want to prepare the standby blob?
A: Use the --dbname option followed by the name of the Oracle AI Database. For example:
--dbname myDatabase
Q: How do I specify the location where the standby blob file will be generated?
A: Use the --blobLocation option to specify the custom directory path where the standby blob file will be generated. For example:
--blobLocation /path/to/standby_blob
Q: What does the –dbname option do in the command?
A: The --dbname option specifies the name of the Oracle AI Database for which the standby blob file is being prepared.
Q: What is the purpose of the –blobLocation option?
A: The --blobLocation option defines the custom directory path where the standby blob file will be created.
Q: Can I run the dbaascli dataguard prepareStandbyBlob command as a user other than root or oracle?
A: No, the command must be run as either the root or oracle user.
Q: Is it possible to use a relative path for the –blobLocation option?
A: It is recommended to use an absolute path for the --blobLocation option to ensure the standby blob file is created in the required directory.
Q: What should I do if I want to change the location where the standby blob file is generated?
A: Modify the --blobLocation option to specify a new directory path for the standby blob file.
Q: Do I need to perform any additional steps after generating the standby blob file?
A: Yes, after generating the standby blob file, you need to transfer it to the standby site and use it for the Data Guard configuration.
dbaascli dataguard updateDGConfigAttributes
To update Data Guard automation attributes across all the cluster nodes, use the dbaascli dataguard updateDGConfigAttributes command.
Run the command as the root or oracleuser.
Syntax:
dbaascli dataguard updateDGConfigAttributes --attributes <value>
Parameters:
| Parameter | Description |
|---|---|
--attributes |
contains the Data Guard automation attributes that are to be modified. Accepts comma-delimited values in the format <attribute=value>. Attributes must be predefined in the Data Guard configuration file. |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli dataguard updateDGConfigAttributes command?
A: The dbaascli dataguard updateDGConfigAttributes command is used to update Data Guard automation attributes across all cluster nodes.
Q: What are the prerequisites for running the dbaascli dataguard updateDGConfigAttributes command?
A: The command must be run as either the root or oracle user.
Q: How do I specify the attributes that I want to update using this command?
A: Use the --attributes option followed by the attributes to be modified. The attributes should be in a comma-delimited format, such as attribute=value. For example:
--attributes attribute1=value1,attribute2=value2
Q: What format should the –attributes option values be in?
A: The --attributes option values should be in a comma-delimited format with each attribute specified as attribute=value.
Q: Can I specify multiple attributes in the –attributes option?
A: Yes, you can specify multiple attributes by separating them with commas. For example:
--attributes attribute1=value1,attribute2=value2
Q: What happens if I provide an attribute that is not predefined in the Data Guard configuration file?
A: If you provide an attribute that is not predefined, the command may fail or ignore the unrecognized attribute. Ensure that all attributes are predefined in the Data Guard configuration file.
Q: Do I need to restart any services after updating Data Guard automation attributes?
A: In most cases, you do not need to restart services after updating attributes. However, check the specific attributes and their impact to determine if a restart is required.
Q: How can I verify if the Data Guard attributes have been successfully updated?
A: After running the command, you can verify the updated attributes by checking the Data Guard configuration or using appropriate verification commands/tools specific to your setup.
Q: What should I do if the command fails to update the attributes?
A: Check the error messages for details on what went wrong. Ensure that you have specified valid attributes and that they are predefined in the Data Guard configuration file. Verify user permissions and command syntax.
Q: Is it possible to update attributes for only specific nodes using this command?
A: No, the dbaascli dataguard updateDGConfigAttributes command updates attributes across all cluster nodes. If you need to update attributes for specific nodes, you may need to use different methods or commands.
dbaascli dataguard failover
To perform a manual failover to the standby database, use the dataguard failover command.
Run this command as the oracle user on the target standby database.
Syntax:
dbaascli dataguard failover --dbname <value> [--useImmediateFailover] [--executePrereqs] [--waitForCompletion <value>] [--resume [--sessionID <value>]]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--useImmediateFailover |
use this flag when the Oracle Data Guard configuration in a warning or error state. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
Performing a Manual Failover Operation Using the dbaascli Utility
To perform a manual failover to the standby database, use the dataguard failover command.
-
Connect to the virtual machine in the Oracle Data Guard configuration that will host the new primary database as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell and then switch to the
oracleuser:$ sudo -s # su - oracle $ -
Initiate the failover to the standby database.
$ dbaascli dataguard failover --dbname <db-name> -
Return to being the
rootuser.$ exit # -
Exit the root-user command shell and disconnect from the virtual machine.
# exit $ exit
dbaascli dataguard reinstate
To reinstate a failed database as a standby database after a failover, use the dataguard reinstate command.
Run this command as the oracle user on where reinstate is required (that is failed standby database).
Syntax:
dbaascli dataguard reinstate --dbname <value> [--primaryDBUniqueName <value>] [--executePrereqs] [--waitForCompletion <value>] [--resume [--sessionID <value>]]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--primaryDBUniqueName |
specifies database unique name of the current primary database in the Oracle Data Guard setup. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
To determine when a member should be reinstated in a Data Guard (DG) configuration:
Monitor the dgmgrl show database output for the following ORA errors:
-
On the new primary cluster:
ORA-16661: The standby database must be reinstated
-
On the old primary cluster:
ORA-16623: Member detected role change
These messages indicate that a failover has occurred. To restore full synchronization within the Data Guard configuration, the former primary must be reinstated.
Reinstating a Failed Primary Database Using the dbaascli Utility
To reinstate a failed primary database after a failover, use the dataguard reinstate command.
-
Connect to one of the virtual machines in the Oracle Data Guard configuration as the
oracleuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Initiate reinstatement of the failed primary database.
$ dbaascli dataguard reinstate --dbname <db-name>In a multiple standby setup (Data Guard group), it is recommended to specify the
--primaryDBUniqueNameargument.dbaascli dataguard reinstate --dbname <db-name> --primaryDBUniqueName <primary-DB-unique-name> -
Disconnect from the virtual machine.
$ exit
dbaascli dataguard switchover
To perform a switchover to the standby database, use the dataguard switchover command.
Run this command as the oracle user.
Syntax:
dbaascli dataguard switchover --dbname <value> [--targetStandbyDBUniqueName <value>] [--executePrereqs] [--enableDGDebug] [--waitForCompletion <value>] [--resume [--sessionID <value>]]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--targetStandbyDBUniqueName |
specifies the standby database unique name to change the role from standby to primary database. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--enableDGDebug |
enables the traces while performing the operation. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
Performing a Switchover Operation Using the dbaascli Utility
To perform a switchover to the standby database, use the dataguard switchover command.
-
Connect to the virtual machine in the Oracle Data Guard configuration that will host the new primary database as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell and then switch to the
oracleuser.$ sudo -s # su - oracle $ -
Initiate the switchover to the standby database.
$ dbaascli dataguard switchover --dbname <db-name>In a multiple standby setup (Data Guard group), it is recommended to specify the
--targetStandbyDBUniqueNameargument.dbaascli dataguard switchover --dbname <db-name> --targetStandbyDBUniqueName <target-standby-DB-unique-name> -
Return to being the
rootuser.$ exit # -
Exit the root-user command shell and disconnect from the virtual machine.
# exit $ exit
dbaascli dataguard prepareForStandby
To create an Oracle Standby Database, use the dbaascli dataguard prepareForStandby command as the first step.
Run this command as the root user on the primary database. At the end of the command run, a standby BLOB file is created. You must copy this file to the standby database system to proceed with the configureStandby step.
Note: For Disaster Recovery (DR) configurations on Oracle Base Database Cloud@Customer, you must use the Oracle Cloud Infrastructure (OCI) Console or the OCI SDK to set up Data Guard. The dbaascli utility is not supported for this use case and should not be used.
Syntax:
dbaascli dataguard prepareForStandby --dbname <value> --standbyDBUniqueName <value> --standbyDBDomain | --noDBDomain --standbyScanIPAddresses <Standby SCAN IP Addresses> [ --standbyScanPort ] [ --standbyServiceName ] [ -- primaryScanIPAddresses ] [ --primaryScanPort ] [--executePrereqs] [--resume [--sessionID <value>]] [--revert [--sessionID <value>]] [--waitForCompletion] [--skipDRConfiguration]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--standbyDBUniqueName |
specifies the standby database unique name for which the primary database will be configured. |
--standbyDBDomain |
specifies the standby database domain for which the primary database will be configured. |
--noDBDomain |
specifies not to use the database domain name for standby database. |
--standbyScanIPAddresses |
specifies a comma-delimited list of IP addresses corresponding to the standby database SCAN listener, or the SCAN name of the standby database. |
--standbyScanPort |
specifies the corresponding SCAN port number of the standby database. |
--standbyServiceName |
specifies the name of the standby database service for which the primary database will be configured. |
--primaryScanIPAddresses |
specifies a comma-delimited list of IP addresses corresponding to the primary database SCAN listener, or the SCAN name of the primary database. |
--primaryScanPort |
specifies the corresponding SCAN port number of the primary database. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
--revert |
rolls back the previous operation. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
--skipDRConfiguration |
specifies whether to skip Disaster Recovery (DR) configuration as part of the standby database setup. Valid values: true (skip DR configuration) or false (configure DR). |
Performing PrepareForStandby Operation Using the dbaascli Utility
To prepare the primary database for creating a new standby database, use the dbaascli dataguard prepareForStandby command.
-
Connect to the Virtual Machine where you want to host the primary database as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
prepareForStandbycommand. Enter theSYSpassword when prompted.dbaascli dataguard prepareForStandby --dbName <db name> --standbyDBUniqueName <standby db unique name> --standbyDBDomain <standby db domain> --standbyScanIPAddresses <comma-delimieted list of standby SCAN IP addresses> --primaryScanIPAddresses <comma-delimited list of primary SCAN IP addresses> --standbyScanPort <standby SCAN listener port>Upon completion, the command displays the location where the standby BLOB file is created.
-
Exit the root-user command shell and disconnect from the virtual machine.
# exit
dbaascli dataguard configureStandby
To create a new Standby Database, use the dbaascli dataguard configureStandby command as a second step after the prepareForStandby step.
Run this as the root user on the standby cluster.
Syntax:
dbaascli dataguard configureStandby --dbname <value> --oracleHome <value> | --oracleHomeName <value> --standbyDBUniqueName <value> [--standbyDBDomain <value>] | [--noDBDomain] --primaryScanIPAddresses <value> --primaryScanPort <value> --primaryServiceName <value> --protectionMode <value> --transportType <value> --activeDG <value> [--standbyBlobFromPrimary <value>] | [--standbyDBInfoJsonLocation <value>] [--standbyScanIPAddresses <value>] [--standbyScanPort <value>] [--standbySID <value>] [--nodeList <value>] [--skipAWRConfiguration] [--primaryDBOCID <value>] [--sgaSizeInMB <value>] [--pgaSizeInMB <value>] [--datafileDestination <value>] [--fraDestination <value>] [--redoLogDestination <value>] [--fraSizeInMB <value>] [--tdeKeyStoreType <value> [--tdeKeyOCID <value>]] [--tdeKeyOCID <value>] [--executePrereqs] [--resume [--sessionID <value>]] | [--revert [--sessionID <value>]] --waitForCompletion <value>] [--enableFIPS <value>] [--skipDRConfiguration] [--okvServer <value> --okvAdminUserName <value> [--okvServerRestPort <value>]] [--okvWalletName <value>]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--oracleHome |
specifies the Oracle home path. |
--oracleHomeName |
specifies the Oracle home name. |
--standbyDBUniqueName |
specifies the database unique name for the standby database. |
--standbyDBDomain |
specifies the standby database domain for which the primary database will be configured. |
--noDBDomain |
specifies not to use the database domain name for standby database. |
--primaryScanIPAddresses |
specifies a comma-delimited list of IP addresses corresponding to the primary database SCAN listener, or the SCAN name of the primary database. |
--primaryScanPort |
specifies the corresponding SCAN port number of the primary database service. |
--primaryServiceName |
specifies the name of the primary database service for which the standby database will be configured. |
--protectionMode |
specifies the Data Guard protection mode to be set when configuring the standby database. Valid values: MAX_PERFORMANCE or MAX_AVAILABILITY. |
--transportType |
specifies the Data Guard transport type to be set when configuring the standby database. Valid values: ASYNC or SYNC. |
--activeDG |
specifies if the Data Guard configuration will be active or not. Valid values: true or false. |
--standbyBlobFromPrimary |
specifies the location of the standby BLOB file, which is prepared from the primary database. This is required only for standby operations. |
--standbyDBInfoJsonLocation |
specifies the location of the info file generated from the primary database for exporting additional metadata. This option is required only for standby operations. |
--standbyScanIPAddresses |
specifies a comma-delimited list of IP addresses corresponding to the standby database SCAN listener, or the SCAN name of the standby database. |
--standbyScanPort |
specifies the corresponding SCAN port number of the standby database. |
--standbySID |
specifies the standby database SID for standby configuration. |
--nodeList |
specifies a list of nodes where the standby database is expected to run, including nodes that are already running or configured. |
--skipAWRConfiguration |
specifies whether to skip Oracle AWR configuration as part of the standby database setup. Valid values: true (skip AWR configuration) or false (configure AWR). |
--primaryDBOCID |
specifies the resource OCID value corresponding to the primary database. |
--sgaSizeInMB |
specifies sga_target value in MB. |
--pgaSizeInMB |
specifies the pga_aggregate_target value in MB. |
--datafileDestination |
specifies the storage location to use for database datafiles. |
--fraDestination |
specifies the storage location to use for database fast recovery area. |
--redoLogDestination |
specifies the storage location to use for the redo log files. |
--fraSizeInMB |
specifies fast recovery area size value in MB. |
--tdeKeyStoreType |
specifies the TDE keystore type. Valid values: FILE, KMS, AZURE, GOOGLE, AWS, or OKV |
--tdeKeyOCID |
specifies KMS/AZURE/GOOGLE/AWS key OCID to use for TDE. This is applicable only if KMS/AZURE/GOOGLE/AWS is selected for TDE keystore type. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
--revert |
rolls back the previous operation. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
--enableFIPS |
specifies whether to enable FIPS. Set to false to disable it. Valid values: true or false. |
--skipDRConfiguration |
specifies whether to skip Disaster Recovery (DR) configuration as part of the standby database setup. Valid values: true (skip DR configuration) or false (configure DR). |
--okvServer |
specifies the Oracle Key Vault server. Comma-delimited list of multiple IP addresses. |
--okvAdminUserName |
specifies the Oracle Key Vault admin user name. |
--okvServerRestPort |
specifies the REST port number for Oracle Key Vault. |
--okvWalletName |
specifies the Oracle Key Vault wallet name. |
Performing configureStandby Operation Using the dbaascli Utility
To create a standby database, use the dbaascli dataguard configureStandby command.
-
Connect to the Virtual Machine where you want to host the standby database as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
configureStandbycommand.dbaascli dataguard configureStandby --standbySID <standby SID> --activeDG <true|false> --dbName <db name> --standbyDBUniqueName <standby db unique name> --standbyScanName <comma-delimited list of standby SCAN IP addresses> --protectionMode <MAX_PERFORMANCE|MAX_AVAILABILITY> --standbyScanPort <standby SCAN port> --oracleHome <oracle home path> --standbyDBDomain <standby db domain name>. --primaryServiceName <primary db service name> --transportType <ASYNC|SYNC> --primaryScanPort <primary db SCAN port> --primaryScanIPAddresses <comma-delimited list primary db SCAN IP addresses> --standbyBlobFromPrimary <standby BLOB from primary> -
Enter the primary database
SYS,TDE, andAWRpasswords when prompted.Upon successful completion of the command, the standby database starts and becomes operational.
dbaascli dataguard registerStandby
To register a newly created standby database with all existing standby databases and to primary database, use the dbaascli dataguard registerStandby command as a third step after configureStandby step.
Run this command as the root user on the primary cluster. Additionally, in a multiple-standby setup, run the command on all standby clusters except the newly created standby database cluster.
Syntax:
dbaascli dataguard registerStandby --dbname <value> --standbyDBUniqueName <value> --standbyDBDomain <value> | --noDBDomain --standbyScanIPAddresses <value> [--standbyScanPort <value>] [--standbyServiceName <value>] [--executePrereqs] [--resume [--sessionID <value>]] | [--revert [--sessionID <value>]] [--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--standbyDBUniqueName |
specifies the database unique name of the standby database to be registered with the Oracle Data Guard Broker configuration. |
--standbyDBDomain |
specifies the standby database domain for which the primary database will be configured. |
--noDBDomain |
specifies not to use the database domain name for standby database. |
--standbyScanIPAddresses |
specifies a comma-delimited list of IP addresses corresponding to the standby database SCAN listener, or the SCAN name of the standby database. |
--standbyScanPort |
specifies the corresponding SCAN port number of the standby database. |
--standbyServiceName |
specifies the name of the standby database service for which the primary database will be configured. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
--revert |
rolls back the previous operation. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
Performing registerStandby Operation Using the dbaascli Utility
To register the specified standby database with the Oracle Data Guard Broker configuration, use the dbaascli dataguard registerStandby command.
For single standby use cases, the registerStandby command must be run only on the primary cluster, as there is a one-to-one association between the primary and the standby.
However, in configurations with multiple standby databases, you must run the registerStandby command on both the primary cluster and all existing standby clusters-excluding the new standby database being added.
For example, consider a setup with two standby databases: stdby1 and stdby2, where stdby2 is the new standby to be registered. In this case, run the registerStandby command on the primary cluster and on stdby1, but not on stdby2.
In summary, when adding a new standby database to an existing Oracle Data Guard configuration, run the registerStandby command on the primary and on all other previously registered standby clusters, except the new standby being added.
-
Connect to the primary cluster of the Data Guard configuration as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
registerStandbycommand.dbaascli dataguard registerStandby --dbname <db-name> --standbyDBUniqueName <standby-DB-unique-name> --standbyDBDomain <standby-DB-domain>Upon successful completion of the command, the specified standby database will be registered with the Oracle Data Guard Broker configuration.
-
Repeat steps 1 through 3, as performed on the primary cluster, on all existing standby clusters in the Oracle Data Guard Broker configuration, except the one being registered.
dbaascli dataguard deregisterStandby
During standby deletion, run the dbaascli dataguard deregisterStandby command before deleting the database on the standby cluster to deregister the standby database from the Oracle Data Guard Broker configuration.
Run this command as the root user on the primary cluster. However, in the context of multiple standby databases, this command needs to be executed on all the standby clusters except the target standby.
Syntax:
dbaascli dataguard deregisterStandby --dbname <value> --standbyDBUniqueName <value> [--executePrereqs] [--resume [--sessionID <value>]] [--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--standbyDBUniqueName |
specifies the database unique name of the standby database to be deregistered from the Oracle Data Guard Broker configuration. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
Performing deregisterStandby Operation Using the dbaascli Utility
During standby deletion, run the dbaascli dataguard deregisterStandby command before deleting the database on the standby cluster to deregister the standby database from the Oracle Data Guard Broker configuration.
For single standby use cases, the deregisterStandby command must be run only on the primary cluster, as there is a one-to-one association between the primary and the standby.
However, in configurations with multiple standby databases, you must run the deregisterStandby command on both the primary cluster and all existing standby clusters-excluding the standby database which is being deregistered currently.
For example, consider a setup with two standby databases: stdby1 and stdby2, where stdby2 is to be deregistered. In this case, run the deregisterStandby command on the primary cluster and on stdby1, but not on stdby2.
In summary, while deleting a standby database from an existing Oracle Data Guard configuration, run the deregisterStandby command on the primary and on all other existing standby clusters before the delete database operation on desired standby cluster.
-
Connect to the primary cluster of the Oracle Data Guard configuration as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
deregisterStandbycommand.dbaascli dataguard deregisterStandby --dbname <db-name> --standbyDBUniqueName <standby-DB-unique-name>Upon successful completion of the command, the specified standby database will be deregistered (removed) from the Oracle Data Guard Broker configuration.
-
Repeat steps 1 through 3, as performed on the primary cluster, on all existing standby clusters in the Oracle Data Guard Broker configuration, except the one being deregistered.
dbaascli dataguard configureAWR
To enable or disable Automatic Workload Repository (AWR) configuration on your Active Data Guard standby, use the dbaascli dataguard configureAWR command.
Run this command as the root user on the Active Data Guard standby cluster where you want to enable or disable AWR configuration. Use this command if AWR was not configured during the standby addition process.
Syntax:
dbaascli dataguard configureAWR --dbname <value> { --action <value> | --enable | --disable } [--executePrereqs] [--resume [--sessionID <value>]]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--action |
specifies whether to enable or disable AWR. Use --action enable to enable AWR and --action disable to disable it. The --action argument is retained for backward compatibility. However, it is recommended to use --enable or --disable, as they provide the same functionality but are more explicit |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
Performing configureAWR Operation Using the dbaascli Utility
To configure AWR on an ADG standby database, use the dbaascli dataguard configureAWR command.
-
Connect to the Virtual Machine where your ADG standby database is hosted as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
configureAWRcommand.To enable AWR, run:
$ dbaascli dataguard configureAWR --dbname <db-name> --enableTo disable AWR, run:
$ dbaascli dataguard configureAWR --dbname <db-name> --disable -
Enter the
SYSandAWRpasswords when prompted.Upon successful completion of the command, the ADG standby database would have been configured with AWR
dbaascli dataguard updateConfiguration
To update the transport mode or protection mode or both the parameters of a Data Guard environment, use the dbaascli dataguard updateConfiguration command.
Run this as the root user.
When the update transport mode command is run on the primary, only the transport mode of the primary database is updated. To update the transport mode of a standby database, the command must be run separately on that standby.
In contrast, when the update protection mode command is run on the primary, the protection mode is updated for both the primary and standby databases. The protection mode can also be updated from the standby side, in which case both the primary and standby databases are updated.
When updating the transport or protection mode from the primary, the system checks the current modes on both the primary and standby databases and proceeds with the update only if all required conditions are met.
Syntax:
dbaascli dataguard updateConfiguration --dbname <value> [--protectionMode <value>] [--transportType <value>] [--standbyDGType <value>] [--executePrereqs] [--resume [--sessionID <value>]] [--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the Oracle AI Database name. |
--protectionMode |
specifies the Data Guard protection mode to be set when configuring the standby database. Valid values: MAX_PERFORMANCE or MAX_AVAILABILITY. |
--transportType |
specifies the Data Guard transport type to be set when configuring the standby database. Valid values: ASYNC or SYNC. |
--standbyDGType |
specifies the standby database Data Guard type to be set. Valid values: ADG or DG. |
--executePrereqs |
runs the prerequisite checks and report the results. |
--resume |
resumes the previous operation. |
--sessionID |
resumes a specific session by its ID. |
--waitForCompletion |
specifies whether to wait for the operation to complete. Set to false to run the operation in the background. Valid values: true or false. |
Performing updateConfiguration Operation Using the dbaascli Utility
To update transport mode and protection mode or both the parameters, use the dbaascli dataguard updateConfiguration command.
-
Connect to the Virtual Machine where your ADG standby database is hosted as the
opcuser.For detailed instructions, see Connecting to a Virtual Machine with SSH.
-
Start a root-user command shell.
$ sudo -s -
Run the
updateConfigurationcommand.$ dbaascli dataguard updateConfiguration --dbname <db-name> --protectionMode MAX_PERFORMANCE|MAX_AVAILABILITY --transportType ASYNC|SYNC --standbyDGType ADG|DG.Upon successful completion of the command, the specified Data Guard will be configured with specified transport mode or protection mode.