19c DB Broker List of Examples
18c DB Broker List of Examples
Oracle Data Guard Broker 12c NF
A new DGMGRL command, VALIDATE DATABASE, enables you to quickly and easily determine whether a database is ready to perform a role change.
Performs a comprehensive set of database checks prior to a role change.
The checks use information available in various Oracle Data Guard views as well as the Automatic Diagnostic Repository.
Oracle Data Guard Broker and Static Service Registration (Doc ID 1387859.1)
Note: Static entries are only used by the Broker itself via the Broker defined StaticConnectIdentifier property. They are NEVER to be used for any other purpose by the user. This includes using it for the normal DGConnectIdentifier, RMAN connections or anything else. Also note that you must never define a static entry for the Broker 'DGB' service. That service is for the Broker exclusive use. Also note that using the "_DGMGRL" or "_DGB" in your TNSNAMES definition is expressly forbidden. Note: Static "_DGMGRL" entries are no longer needed as of Oracle Database 12.1.0.2 in Oracle Data Guard Broker configurations that are managed by Oracle Restart, RAC One Node or RAC as the Broker will use the clusterware to restart an instance. Note that as a best practice, users should not change the default values assigned to the Broker StaticConnectIdentifier property or to the database LOCAL_LISTENER initialization parameter. LOL - I have demonstrated this is not accurate.
Single Instance Database / Single Instance Database with Oracle Restart
SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name) ) )
RAC One Node Database
SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name_1) ) (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name_2) ) )
Administrator Managed RAC Database
The traditional configuration for Oracle RAC databases is an administrator managed configuration.
The SID_NAME value, sid_name#, differs on each host where # is the instance number associated with that host.
SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name#) ) )
Policy Managed RAC Database
The SID_LIST entries in the listener.ora files on each possible host must each contain a SID_DESC clause for each of the SID_NAME values that correspond to all possible RAC instances.
SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name_1) ) ... (SID_DESC= (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (SID_NAME=sid_name_#) ) )
StaticConnectIdentifier and LOCAL_LISTENER
If the user modifies the Broker StaticConnectIdentifier property default value, then the Broker assumes that the user will from this point forward continue to maintain the value. If an instance is started on a different host than the static entry is configured for, the Broker will not be able to connect to the instance when it is shut down.
Similarly, once the database LOCAL_LISTENER initialization parameter has been modified by the user, it will no longer automatically be updated by Oracle Clusterware and will contain an incorrect value if a database instance is relocated to a new host system.
In addition, if the LOCAL_LISTENER initialization parameter for a database is modified by the user after the database has been added to a Data Guard Broker configuration, the existing StaticConnectIdentifier property value does not automatically change to reflect the new LOCAL_LISTENER value.
Note that as a best practice, users should not change the default values assigned to the Broker StaticConnectIdentifier property or to the database LOCAL_LISTENER initialization parameter.
If there is a requirement that the LOCAL_LISTENER parameter be changed then the Broker configuration needs to be manually updated as follows to restore automatic Broker updates of the StaticConnectIdentifier property values for a database instance.
For a Standby database use the DGMGRL CLI to remove the database from the Broker configuration and then add it back to the configuration.
For a Primary database use the DGMGRL CLI to remove and then recreate the entire broker configuration.
Data Guard Broker 11gR2 Prerequisites
LISTENER = (DESCRIPTION = (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name) (PORT=port_num)))) SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=sid_name) (GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain) (ORACLE_HOME=oracle_home) (ENVS="TNS_ADMIN=oracle_home/network/admin")))
Alternatively, you can use a different static service name. If you do, be sure to modify the StaticConnectIdentifier instance-specific property to reflect the static service that has been registered.
You should also be aware of the following additional considerations in an Oracle Clusterware environment:
- The static service must be set in the listener.ora file in the GRID_HOME of all the nodes.
- The ORACLE_HOME listener.ora parameter in the static service definition must be set to the ORACLE_HOME of the instance, not the GRID_HOME.
- The ENVS listener.ora parameter must be used in the static service definition to explicitly set the TNS_ADMIN environment variable to the appropriate network admin directory, which is usually the network admin directory of the Oracle Home for the Oracle database.
- In an Oracle RAC One Node or Policy Managed Oracle RAC environment, the SID_NAME of each possible instance must be specified in the SID_LIST. The SID_NAME of each instance must match the INSTANCE_NAME database initialization parameter of that instance. In an Oracle RAC One Node or Policy Managed Oracle RAC environment, the default value of the INSTANCE_NAME parameter is db_unique_name_instance_number.
Diagnosing Connection Problems with an enabled Data Guard Broker Configuration (Doc ID 745201.1)
- Ensure the TNS-Alias if specified in ‘DGConnectIdentifier’ is setup on all TNSNAMES.ORA in the Data Guard Environment (11g onward)
- Verify that the specified Service in the ‘DGConnectIdentifier’ exists and is registered with the corresponding Listener
Hi, Nice Post. I know this is an old thread. Any way I founded while surfing the web.
Here’s my Question, I have a config RAC PRIM To RAC STBY everything is ok. I can even Switchover. While validating the instance property I figure out something wrong with the setting of StaticConnectIdentifier parameter on our four nodes configuration. They are pointing to a default port ( i dont have default port, even before creating dg config) and basically are using defaults setting of local listener. Like This:
‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=PRIM_DGMGRL)(INSTANCE_NAME=PRIM01)(SERVER=DEDICATED)))’
Do you think I have change them all or clusterware take care of them as they said during the validate network and validate Connect Identifier. Btw the Listeners doesnt have either PRIM_DGMGRL services
In case of changing, Do the host entry must be vip-hostname ? What do I do we the service _DGMGRL We dont have any relate entry on listener.ora
Thanks in advance.
Comment by William Laverde — June 16, 2020 @ 6:25 pm |
Were you able to resolve the issues? You can test StaticConnectIdentifier https://mdinh.wordpress.com/2016/12/09/dgmgrl-from-os-command-line . StaticConnectIdentifier is automatically populated and should not be manually modified.
Comment by mdinh — July 11, 2020 @ 10:44 pm |
Never use DGMGRL service as this is solely reserve for the broker. Create service having the same name as db_unique_name and use scan for RAC. Take a look at https://mdinh.wordpress.com/2020/04/17/how-to-create-new-standby-using-active-standby-duplication-from-existing-standby for some Doc on the matter.
Comment by mdinh — June 16, 2020 @ 9:50 pm |