DataGuard:Creating a DG Broker Configuration

Creating a DG Broker Configuration

This tutorial shows you how to use DGMGRL to create a Data Guard Broker configuration. You will learn how to:
  • Add the Broker required listener entries
  • Create _DGMGRL services entry
  • Create the Broker configuration using DGMGRL.
  • Verify the configuration
  • Examine the parameters
  • Ensure the configuration is in Maximum Performance
NOTE: In this OBE, you configure the network for a single server environment. If you are configuring an environment on two different servers, you would need to configure Net Manager on both servers accordingly.
Approximately 20 minutes

Topics

This tutorial covers the following topics:
 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

Overview

The Data Guard command-line interface (DGMGRL) enables you to control and monitor a Data Guard configuration from the DGMGRL prompt or within scripts. You can perform most of the activities required to manage and monitor the databases in the configuration using DGMGRL.
Before you perform this tutorial, you should:
1.Complete the Creating a Physical Standby Database OBE.

Setting the DG_BROKER_START Initialization Parameter

In this task, you set the DG_BROKER_START initialization parameter to TRUE for your primary database and physical standby database.
1.
Connect to your primary database and set the value of DG_BROKER_START using:
ALTER SYSTEM SET dg_broker_start = true;


2.
Now connect to your physical standby database and set the value of DG_BROKER_START using:
ALTER SYSTEM SET dg_broker_start = true;
In this task you define a service for the listener that includes the db_unique_name_DGMGRL.db_domain values for the GLOBAL_DBNAME.
1.To enable DGMGRL to restart instances during the course of broker operations, a service with a specific name must be statically registered with the local listener of each instance. The value for the GLOBAL_DBNAME attribute must be set to a concatenation of _DGMGRL..
Examine the listener.ora file in $HOME/wkdir/dg_broker, and then examin$ORACLE_HOME/network/admin/listener.ora. Note in particular the SID list entries for standby1_DGMGRL andorcl_DGMGRL. Replace $ORACLE_HOME/network/admin/listener.ora with$HOME/wkdir/dg_broker/listener.

2.Reload the listener using the lsnrctl reload command.

Verify the new listener configuration using the lsnrctl status command. The service list should include entries forstandby1_DGMGRL and orcl_DGMGRL:


Creating the Broker Configuration
In this task you create a Data Guard Broker configuration.
1.Invoke DGMGRL and connect to your primary database. Enter your password for SYS.
2.Create the broker configuration including a profile for the primary database.
3.Display information about the configuration.
4.Use the following commands to add your physical standby database to the broker configuration.


5.Use the SHOW CONFIGURATION command to verify that the standby1 database was added to the configuration.

Enabling the Broker Configuration

With the Data Guard environment set successfully for your primary and standby databases, you can now enable the broker configuration.
1.
Enable the entire configuration. This may take some time to complete.

2.Verify that the configuration was successfully enabled.

Testing the Broker with a Switchover

In this task you test the Data Guard Broker configuration by using it to switch the roles of the primary and standby databases.
1.
Test the Data Guard Broker configuration by issuing a SWITCHOVER command. This may take some time to complete.

2.Verify that the SWITCHOVER has successfully completed. Note that standby1 is now the primary database andorcl is now the physical standby.

At this point your may also wish to connect to each database and issue some queries to verify the role switch.
3.
Return your Data Guard environment back to the original database roles by issuing another SWITCHOVERcommand. This may take some time to complete.

4.Verify that the second SWITCHOVER has successfully completed. Note that orcl is again the primary database andstandby1 is the physical standby. Exit DGMGRL to complete this tutorial.

In this tutorial, you learned how to:
Set the DG_BROKER_START Initialization Parameter
Create the Service for the Listener
Create the Broker Configuration
Enable the Broker Configuration
Testing the Broker with a Switchover

 Place the cursor over this icon to hide all screenshots.

 

 

 

No comments: