How to Stop Oracle Data Guard Broker Using ALTER SYSTEM Command

How to Stop Oracle Data Guard Broker Using ALTER SYSTEM Command

Purpose

The command ALTER SYSTEM SET dg_broker_start=false stops the Oracle Data Guard broker by shutting down the Data Guard monitor (DMON) background process. This command is essential when you need to disable broker management temporarily for maintenance tasks, troubleshooting, or configuration changes. Setting this parameter to FALSE prevents the broker from automatically starting when the database instance restarts.

Breakdown of the Code

Original Code

1alter system set dg_broker_start=false
2/

Component Analysis

ALTER SYSTEM: This SQL command modifies instance-level parameters that affect the entire Oracle database system. The changes can be applied dynamically without requiring a database restart, depending on the parameter type.

SET dg_broker_start=false: The dg_broker_start parameter is a Boolean initialization parameter that controls whether the Oracle Data Guard broker should be started. When set to FALSE, it stops the DMON process and prevents the broker from managing the Data Guard configuration. The default value is FALSE, meaning the broker does not start automatically unless explicitly configured.

Forward Slash (/): This character executes the SQL statement in Oracle SQL*Plus or other Oracle command-line tools.

Key Points

  • DMON Process Termination: Setting dg_broker_start to FALSE immediately stops the Data Guard monitor (DMON) background process on the database instance
  • Configuration Preservation: Disabling the broker does not remove or delete the broker configuration from the configuration files
  • Services Continue Running: Redo transport services and log apply services in the Data Guard configuration continue to function normally even when the broker is stopped
  • Both Databases Affected: You typically need to set this parameter to FALSE on both primary and standby databases when performing maintenance or troubleshooting
  • No Primary Disable: You cannot disable the primary database individually through the broker; you must disable the entire configuration

Common Use Cases

Configuration File Changes: You must stop the broker before modifying the dg_broker_config_file1 and dg_broker_config_file2 parameters that specify the location of broker configuration files.

Troubleshooting Failed Failovers: When broker failover operations continue to fail, Oracle recommends stopping the broker on all databases in the configuration to perform manual failover procedures.

Maintenance and Upgrades: Database administrators should disable the Data Guard broker before performing patches or upgrades, then re-enable it after the maintenance is complete.

Broker Configuration Reset: Stopping the broker is the first step when you need to remove and recreate the Data Guard broker configuration from scratch.

Step-by-Step Process

Check Current Broker Status: Before stopping the broker, verify the current value of the parameter using SHOW PARAMETER dg_broker_start.

Disable Configuration (Optional): Use the DGMGRL DISABLE CONFIGURATION command before stopping the DMON process if you want to temporarily suspend broker management.

Execute the Command: Run ALTER SYSTEM SET dg_broker_start=false on each database instance in the configuration.

Verify the Change: Confirm the parameter is set to FALSE by checking SHOW PARAMETER dg_broker_start again.

Perform Required Tasks: Complete your maintenance, troubleshooting, or configuration changes while the broker is stopped.

Restart the Broker: Set the parameter back to TRUE using ALTER SYSTEM SET dg_broker_start=true when ready to resume broker management.

Technical Insights

The Data Guard broker consists of background processes, foreground processes, and system global area (SGA) components that exist as long as the database instance is running and the dg_broker_start parameter is set to TRUE. The DMON process is responsible for monitoring the health of the broker configuration and ensuring every database has a consistent description of the configuration. When you stop the broker, you lose the ability to manage and monitor databases through broker interfaces like DGMGRL or Oracle Cloud Control, but the underlying Data Guard functionality remains operational.

The broker configuration files are binary files maintained by the DMON process for each database in the broker configuration. These files cannot be modified while the broker is running, which is why stopping the broker is necessary before relocating or changing these configuration files. For Oracle RAC databases, all instances share the same configuration file.

Best Practices

Always document your current broker configuration before stopping the broker for maintenance activities. Verify that redo transport and log apply services are functioning correctly after disabling the broker to ensure your Data Guard protection remains intact. When troubleshooting, examine both the alert log file and the broker log files (drc*.log) to identify the root cause of any issues. Make sure to set the dg_broker_start parameter in the server parameter file (SPFILE) to ensure the setting persists across database restarts.

References

Posts in this series