How To Setup Dataguard Broker Configuration (DG Broker) In 12c

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarANKUSH THAVALI
  • 28 Sep, 2023
  • 0 Comments
  • 2 Mins Read

How To Setup Dataguard Broker Configuration (DG Broker) In 12c

How To Setup Dataguard Broker Configuration (DG Broker) In 12c

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 blog, we will see, how to enable dg broker configuration in existing standby setup.

ENVIRONMENT DETAILS:

PRIMARY UNIQUE DB NAME –  PRIM
STANDBY UNIQUE DB NAME – STAND

  1. Set dg_broker_start to true ( ON BOTH PRIMARY AND STANDBY DataBase)

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

System altered.


  1. Add primary dbconfiguration [ 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 "PRIM"
Connected as SYSDG.


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


DGMGRL> SHOW CONFIGURATION

Configuration - primdb

Protection Mode: MaxPerformance
Members:
PRIM - Primary database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

3. Add standby configuration ( ON PRIMARY )
DGMGRL> add database STAND as connect identifier is STAND;
Database "STAND" added


DGMGRL> show configuration

Configuration - primdb

Protection Mode: MaxPerformance
Members:
PRIM - Primary database
STAND - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

Please Note : 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.
Enable configuration: ( ON PRIMARY)
DGMGRL> show configuration

Configuration - primdb

Protection Mode: MaxPerformance
Members:
PRIM - Primary database
STAND - 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)

Check the properties for inconsistency

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

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 'STAND' InconsistentProperties;
INCONSISTENT PROPERTIES
INSTANCE_NAME PROPERTY_NAME MEMORY_VALUE SPFILE_VALUE BROKER_VALUE

DGMGRL> show configuration

Configuration - primdb

Protection Mode: MaxPerformance
Members:
PRIM - Primary database
STAND - 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.

Hope it helps!