Scenario 8: Performing Routine Management Tasks
There may be situations in which you want to change the state or properties of the databases in a broker configuration to perform routine maintenance on one or more databases.
You might also need to temporarily disable broker management of databases in a configuration.
Changing Properties and States
As you monitor the configuration, you might need to dynamically modify the states of the databases or their properties.
The following topics show how to change the state or properties of the databases in the configuration.
Alter a Database Property
You can modify the values of database properties at any time—whether the database is enabled or disabled.
The following example shows how to use the EDIT DATABASE command to change the LogXptMode database property to the value ASYNC for the North_Sales database.
DGMGRL> EDIT DATABASE 'North_Sales' SET PROPERTY 'LogXptMode'=ASYNC;
DGMGRL returns the following message to indicate that the LogXptMode property was updated successfully in the Data Guard configuration file:
Property "LogXptMode" updated
If the configuration is currently disabled, the database does not use the new property value until you enable the broker configuration with the ENABLE CONFIGURATION command.
Reset a Property to Its Default Value
You can reset a configuration or configurable property to its default value at any time whether the database or configuration is enabled or disabled.
The following example shows how to use the EDIT DATABASE command to reset the LogXptMode database configurable property to its default value for the North_Sales database.
EDIT DATABASE 'North_Sales' RESET PROPERTY LogXptMode;
The following example shows how to use the EDIT CONFIGURATION command to reset the TraceLevel configuration property to its default value.
EDIT CONFIGURATION RESET PROPERTY TraceLevel;
Alter the State of a Standby Database
You can temporarily stop Redo Apply on a physical standby.
To change the state of the standby database to APPLY-OFF, enter the EDIT DATABASE command as shown in the following example.
DGMGRL> EDIT DATABASE 'South_Sales' SET STATE='APPLY-OFF'; Succeeded.
Redo data is still being received when you put the physical standby database in the APPLY-OFF state.
Alter the State of a Primary Database
You can stop the transmittal of redo data to the standby database.
To change the state of the primary database to accommodate this, use the following command:
DGMGRL> EDIT DATABASE North_Sales SET STATE=TRANSPORT-OFF; Succeeded.
To change the state of the primary database back to TRANSPORT-ON, do the following:
DGMGRL> EDIT DATABASE North_Sales SET STATE=TRANSPORT-ON; Succeeded.
Disabling the Configuration and Databases
When you disable the broker configuration or any of its databases, you are disabling the broker's management of them and are effectively removing your ability to use DGMGRL to manage and monitor them.
However, disabling the broker's management of a broker configuration does not affect the actual operation of the underlying Oracle Data Guard configuration or the databases. For example, the redo transport services and log apply services in the Oracle Data Guard configuration continue to function unchanged, but you can no longer manage them.
Disable a Configuration
You must use the DISABLE CONFIGURATION command to disable management of the entire broker configuration including the primary database.
For example:
DGMGRL> DISABLE CONFIGURATION;
The only way to disable broker management of the primary database is to use the DISABLE CONFIGURATION command; the DISABLE DATABASE command only disables management of a standby database. Likewise, the DISABLE FAR_SYNC command only disables management of a far sync instance.
Note:
If you disable management of a configuration while connected to the standby database or far sync instance, you must connect to the primary database (that is, a database whose control file role is primary) to reenable the configuration.
Disabling the broker's management of a configuration member does not remove the member from the broker configuration file. You can reenable your ability to use DGMGRL (or Cloud Control) to manage the member by entering the appropriate ENABLE CONFIGURATION or ENABLE DATABASE command.
Disable a Standby Database
You use the DISABLE DATABASE command when you temporarily do not want the broker to manage and monitor a standby database.
You can explicitly disable broker management of a standby database to prevent it from being enabled when the rest of the configuration is enabled. The following example shows how to disable the South_Sales standby database.
DGMGRL> DISABLE DATABASE 'South_Sales'; Disabled.
Note:
You cannot disable a standby database from the configuration if fast-start failover is enabled and the database to be disabled is the target standby database.
Note:
If you disable management of a standby database while connected to that standby database, you must connect to the primary database or another enabled standby database to reenable broker-management of the standby database.
WARNING:
If you disable broker management of a standby database in the broker configuration, that standby database cannot be used by the broker as a failover target in the event of loss of the primary database.
When operating under either maximum protection mode or maximum availability mode, the broker prevents you from disabling the last standby database that supports the protection mode.
Disabling a Far Sync Instance
Use the DISABLE FAR_SYNC command when you temporarily do not want the broker to manage and monitor a far sync instance.
You can explicitly disable broker management of a far sync instance to prevent it from being enabled when the rest of the configuration is enabled. The following example shows how to disable the far sync instance.
DGMGRL> DISABLE FAR_SYNC 'FS'; Disabled.
Note:
The following restrictions apply when disabling a far sync instance:
-
You cannot disable a far sync instance if it is specified in the
RedoRoutesproperty of any other configuration member. -
If you disable management of a far sync instance while connected to that far sync instance, you must connect to the primary database or another enabled standby database to reenable broker management of the far sync instance.
Caution:
If you disable broker management of a far sync instance in the broker configuration, that far sync instance cannot be specified in a RedoRoutes property for any other configuration member.
Removing the Configuration, a Standby Database, or a Far Sync Instance
When you use the REMOVE CONFIGURATION, REMOVE DATABASE, or REMOVE FAR_SYNC command, you effectively delete the configuration, standby database, or far sync instance from the broker configuration file, removing the ability of Oracle Data Guard broker to manage them.
A remove operation with the PRESERVE DESTINATIONS clause does not remove or delete the actual Oracle Data Guard configuration underneath, nor does it affect the operation of the actual Oracle Data Guard configuration and its databases.
Note:
After you use the REMOVE CONFIGURATION, REMOVE DATABASE, or REMOVE FAR_SYNC command, you must reissue the command(s) that you originally issued if you decide to re-create the deleted object. You must go through the steps in Scenario 1: Creating a Configuration as necessary, to create a broker configuration that can be managed with DGMGRL (or Cloud Control).
Note:
The following restrictions apply:
-
You cannot remove a standby database from the configuration if fast-start failover is enabled and the database to be removed is the target standby database.
-
You cannot remove a standby database or a far sync instance if it is specified in the
RedoRoutesproperty for any other member in the configuration.
Removing a Standby Database from the Configuration
When you use the REMOVE DATABASE command, broker management and monitoring of the database ceases and the database is deleted from the broker configuration file.
Show the configuration before deletion of the South_Sales standby database:
DGMGRL> SHOW CONFIGURATION;
Configuration - DRSolution
Protection Mode: MaxPerformance
Members:
North_Sales - Primary database
FS - Far Sync
South_Sales - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 32 seconds ago)
Reset the RedoRoutes property for far sync instance
FS so that it no longer specifies database South_Sales
and then issue the DGMGRL REMOVE DATABASE command to remove the
South_Sales database information from the Data Guard configuration
file:
DGMGRL> EDIT FAR_SYNC ‘FS' RESET PROPERTY RedoRoutes; Property "redoroutes" updated for member "FS". DGMGRL> REMOVE DATABASE ‘South_Sales’; Removed database "South_Sales" from the configuration
Show the configuration after deletion of the South_Sales standby database:
DGMGRL> SHOW CONFIGURATION;
Configuration - DRSolution
Protection Mode: MaxPerformance
Members:
North_Sales - Primary database
FS - Far Sync
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 19 seconds ago)
When operating under either maximum protection mode or maximum availability mode, the broker prevents you from deleting the last standby database that supports the protection mode.
Removing a Far Sync Instance from the Configuration
Use the REMOVE FAR_SYNC command to remove far sync instance information from the Oracle Data Guard configuration file.
For example, use the following commands to remove the FS far sync
instance information:
DGMGRL> EDIT DATABASE 'North_Sales' RESET PROPERTY RedoRoutes; Property "redoroutes" updated for member "North_Sales". DGMGRL> REMOVE FAR_SYNC 'FS'; Removed far sync instance "FS" from the configuration
Show the configuration after deletion of the FS far sync instance:
DGMGRL> SHOW CONFIGURATION; Configuration - DRSolution Protection Mode: MaxPerformance Members: North_Sales - Primary database Fast-Start Failover: DISABLED Configuration Status: SUCCESS (status updated 44 seconds ago)
Removing a Broker Configuration
Use the DGMGRL REMOVE CONFIGURATION command to remove the entire configuration from management and monitoring by the broker.
For example:
DGMGRL> REMOVE CONFIGURATION; Removed configuration
Note:
You cannot remove the configuration if fast-start failover is enabled.
DGMGRL returns the following message to indicate the command successfully removed all of the configuration information from the Data Guard configuration file:
DGMGRL> SHOW CONFIGURATION; Error: ORA-16532: Data Guard broker configuration does not exist Configuration details cannot be determined by DGMGRL