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

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

You May Also Like

Perform Flashback in pluggable database(PDB) in oracle 12.2
How to disable enable log shipping in standby using dgmgrl
FLASHBACK parameter in DATAPUMP(EXPDP)
how to change archivelog destination in oracle
DEFERRED_SEGMENT_CREATION parameter in oracle
SKIP_CONSTRAINT_ERRORS as DATA_OPTION in impdp
Apply database proactive bundle patch in RAC using manual process
How to recreate MGMT database in ORACLE 12C GRID
SAMPLE parameter in EXPDP to export subset of data
Hive Installation with derby

From This Website

Oracle database Security Assessment Tool
How to setup dataguard broker configuration (DG broker) in 12c
Steps for changing public hostname for a standalone grid infrastructure
How to Read CSV files in R studio
Flashback primary database in dataguard environment
ORA-20101: TABLESPACE is not a ASSM (Automatic Segment Space Management) tablespace
How to install OPatch in ORACLE RAC
How to get tablespace quota details of an user in oracle
ORA-01536: space quota exceeded for tablespace
How to drop SQL baselines in oracle