Dataguard broker is used to automate monitoring and controlling standby setups. It is very much useful, when the organization has multiple standby sites.

In this article, we will see, how to enable dg broker configuration in existing standby setup.

NOTE - Before setting dgbroker, make sure standby setup is ready.

SEE ALSO - Setup physical standby setup

ENVIRONMENT DETAILS:

PRIMARY UNIQUE DB NAME - > POCDB
STANDBY UNIQUE DB NAME - > POCDSBY

1. Set dg_broker_start to true [ ON BOTH PRIMARY AND STANDBY DB]

POCDB> alter system set dg_broker_start=true sid='*';

System altered.


POCDSBY> alter system set dg_broker_start=true sid='*';

System altered.


2. Add primary db configuration [ ON PRIMARY]

$dgmgrl
DGMGRL for Solaris: Release 12.2.0.1.0 - Production on Sun Apr 8 12:22:13 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sysdg
Password:
Connected to "POCD"
Connected as SYSDG.


DGMGRL> CREATE CONFIGURATION 'poc_dg' AS PRIMARY DATABASE IS 'POCD' CONNECT IDENTIFIER IS POCD;
Configuration "poc_dg" created with primary database "POCD"


DGMGRL> SHOW CONFIGURATION

Configuration - poc_dg

  Protection Mode: MaxPerformance
  Members:
  POCD - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED


3. Add standby configuration [ ON PRIMARY ]

DGMGRL>  add database POCDSBY as connect identifier is POCDSBY;
Database "pocdsby" added


DGMGRL> show configuration

Configuration - poc_dg

  Protection Mode: MaxPerformance
  Members:
  POCD    - Primary database
    pocdsby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

If you are getting error as ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set, then
To fix this error, disable any log_archive_dest_n parameter set on standby( excluding log_archive_dest_1)

On standby:

SQL> alter system set log_Archive_dest_2=";

System altered.

4. Enable configuration: [ ON PRIMARY]

DGMGRL> show configuration

Configuration - poc_dg

  Protection Mode: MaxPerformance
  Members:
  POCD    - Primary database
    pocdsby - Physical standby database
      Warning: ORA-16792: configurable property value is inconsistent with member setting

Fast-Start Failover: DISABLED

Configuration Status:
WARNING   (status updated 57 seconds ago)


Now let-s troubleshoot the ORA-16792 error, We are getting error standby database.

Check the properties for inconsistency.

DGMGRL> show database 'pocdsby' InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE
         POCDSBY StandbyFileManagement               MANUAL                                    MANUAL
         POCDSBY     ArchiveLagTarget                    0                                         0
         POCDSBY LogArchiveMaxProcesses                    4                                         4
         POCDSBY LogArchiveMinSucceedDest                    1                                         1
         POCDSBY DataGuardSyncLatency                    0                                         0
         POCDSBY      LogArchiveTrace                    0            (missing)                    0
         POCDSBY     LogArchiveFormat         %t_%s_%r.dbf            (missing)         %t_%s_%r.dbf




We can see one critical parameter StandbyFileManagement is set to MANUAL . To fix the error set it to auto and try again.

- On standby

SQL> alter system set standby_file_management=AUTO scope=both;

System altered.

Enable the configuration again:

DGMGRL> enable configuration
Enabled.

DGMGRL> show database 'pocdsby' InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE

DGMGRL> show configuration

Configuration - poc_dg

  Protection Mode: MaxPerformance
  Members:
  POCD    - Primary database
    pocdsby - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 49 seconds ago)


Our dgbroker setup is ready and we can do switchover and failover using dgmgrl easily.

dataguarddgmgrl DATAGUARD


Related Topics

Flashback primary database in dataguard environment
How to recreate physical standby controlfile
Standby redologs in oracle dataguard
How to setup dataguard broker configuration (DG broker) in 12c
How to disable enable log shipping in standby using dgmgrl
How to enable active dataguard in physical standby database
How to add a tempfile in primary database in dataguard
How to use expdp to export data from physical standby database
Useful DGMGRL commands in oracle dataguard

You May Also Like

How to use expdp to export data from physical standby database
Clone a database using dbca command in oracle 19c -New feature
ORA-16855: transport lag has exceeded specified threshold
ORA-32774: more than one file was specified for bigfile tablespace
Tablespace monitoring shell script
ESTIMATE REQUIRED DISK SPACE FOR EXPORT USING estimate_only
FLASHBACK parameter in DATAPUMP(EXPDP)
How to get tablespace quota details of an user in oracle
How to find cpu and memory information of oracle database server
How to move AUD$ table to another tablespace using DBMS_AUDIT_MGMT

From This Website

How to find execution history of an sql_id
how to use DBMS_PRIVILEGE_CAPTURE to capture privs in oracle 12c
Display sql_id of the sql, using set feedback in oracle 18C - New feature
Find the active transactions in oracle database
SKIP_CONSTRAINT_ERRORS as DATA_OPTION in impdp
ENABLE_DDL_LOGGING in oracle 12c
Hive installation with mysql database
Upgrade database using OEM 12C cloud control
Oracle database Security Assessment Tool
Change dbsnmp password for target db in oem 12c