Follow these steps to test disabling and enabling the standby database:
DGMGRL> show database 'INDIA_UN'; Database - INDIA_UN Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds Apply Lag: 0 seconds Real Time Query: ON Instance(s): INDIA Database Status: SUCCESS
DGMGRL> disable database 'INDIA_UN'; Disabled.
DGMGRL> show database 'INDIA_UN'; Database - INDIA_UN Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: (unknown) Apply Lag: (unknown) Real Time Query: OFF Instance(s): INDIA Database Status: DISABLED
DISABLED
state and won't be monitored by the broker. However, the configuration status will be SUCCESS
.DGMGRL> enable database 'INDIA_UN'; Enabled.
DGMGRL> show database 'INDIA_UN'; Database - INDIA_UN Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds Apply Lag: 0 seconds Real Time Query: ON Instance(s): INDIA Database Status: SUCCESS
Now the database is enabled and is part of the broker configuration again.
We've learned how to disable and enable Data Guard broker management completely, and how to disable and enable only a standby database of the configuration.
After the creation of the Data Guard configuration using DGMGRL, you can edit the configuration or single database properties. The following command is an example of a configuration change that changes the fast-start failover threshold value to 60 seconds. This command can be run either from the primary or the standby database:
DGMGRL> show configuration 'FastStartFailoverThreshold'; FastStartFailoverThreshold = '30' DGMGRL> edit configuration set property FastStartFailoverThreshold=60; Property "faststartfailoverthreshold" updated DGMGRL> show configuration 'FastStartFailoverThreshold'; FastStartFailoverThreshold = '60'
These changes will be updated in all the configuration files.
On the other hand, database property changes are specific to either the primary or a standby database. It won't perform changes in the rest of the configuration. In case it's a clustered database, these changes will be applicable for all of the instances of that database. An example to change the archive log tracing level to 10
in the standby database only is as follows:
DGMGRL> show database 'INDIA_UN' 'LogArchiveTrace'; LogArchiveTrace = '0' DGMGRL> edit database 'INDIA_UN' SET PROPERTY LogArchiveTrace=10; Property "logarchivetrace" updated DGMGRL> show database 'INDIA_UN' 'LogArchiveTrace'; LogArchiveTrace = '10'
Now it's your turn to try changing some database properties. You can practice with the following parameters by monitoring, changing, and restoring their values as follows:
DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY 'LogArchiveFormat'= 'log_%t_%s_%r_%d.arc';DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY LogXptMode=SYNC; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY LogShipping=OFF; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY NetTimeout=30; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY 'ReopenSecs'=400; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY ArchiveLagTarget=800; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY 'DbFileNameConvert' = '/u01/app/oracle/oradata/orcl/, /u02/app/oracle/oradata/orcl/'; DGMGRL> EDIT DATABASE 'INDIA_UN' SET PROPERTY DelayMins='540';