Dataguard Broker Configuration DG Broker in Oracle 12c
Introduction
Dataguard BrokerDG Broker in Oracle 12c is used to automate monitoring and controlling standby setups. it is very useful when we have multiple standby systems
In this DG Broker in Oracle 12c blog we are going to expalin how to enable db broker configuration in Oracle 12c in existing standby setup. before going to start the process dg broker make sure standby setup is ready
Prerequisites
PRIMARY UNIQUE DB NAME---------->PROCDB
STANDBY UNIQUE DB NAME------------>PROCSTAN
Now let us start the process
Step 1 : Set dg_broker_start to true [ON BOTH PRIMARY DB AND STANDBY DB]
PROCDB> alter system set dg_broker_start=true sid='*';
System altered.
PROCSTAN> alter system set dg_broker_start=true sid='*';
System altered.
Step 2: Add primary db configuration[ ON PRIMARY]
$dgmgrl
DGMGRL for Solaris: Release 12.2.0.1.0 - Production on Sun May 3 12:22:13 2020
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 "PROCDB"
Connected as SYSDG.
DGMGRL> CREATE CONFIGURATION 'procdb_dg' AS PRIMARY DATABASE IS 'PROCDB' CONNECT IDENTIFIER IS PROCDB;
Configuration "procdb_dg" created with primary database "PROCDB"
DGMGRL> SHOW CONFIGURATION
Configuration - procdb_dg
Protection Mode: MaxPerformance
Members:
PROCDB - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
Step 3: Add standby Configuration[ ON PRIMARY]
DGMGRL> add database PROCSTAN as connect identifier is PROCSTAN;
Database "procstan" added
DGMGRL> show configuration
Configuration - procdb_dg
Protection Mode: MaxPerformance
Members:
PROCDB - Primary database
procstan - 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.
Step4: Enable configuration [ON PRIMARY]
DGMGRL> show configuration
Configuration - procdb_dg
Protection Mode: MaxPerformance
Members:
PROCDB - Primary database
procstan - 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 lets trouble shoot the ORA-16792 error, we are getting error standby database
Check the properties for inconsistency
DGMGRL> show database 'procstan' InconsistentProperties;
INCONSISTENT PROPERTIES
INSTANCE_NAME PROPERTY_NAME MEMORY_VALUE SPFILE_VALUE BROKER_VALUE
PROCSTAN StandbyFileManagement MANUAL MANUAL
PROCSTAN ArchiveLagTarget 0 0
PROCSTAN LogArchiveMaxProcesses 4 4
PROCSTAN LogArchiveMinSucceedDest 1 1
PROCSTAN DataGuardSyncLatency 0 0
PROCSTAN LogArchiveTrace 0 (missing) 0
PROCSTAN LogArchiveFormat %t_%s_%r.dbf (missing) %t_%s_%r.dbf
Here we can see one critical parameter StandbyFileManagement is set to be MANUAL. to fix the error set to auto and try again
SQL> alter system set standby_file_management=AUTO scope=both;
System altered.
Enable the configuration again
DGMGRL> enable configuration
Enabled.
DGMGRL> show database 'procstan' InconsistentProperties;
INCONSISTENT PROPERTIES
INSTANCE_NAME PROPERTY_NAME MEMORY_VALUE SPFILE_VALUE BROKER_VALUE
DGMGRL> show configuration
Configuration - procdb_dg
Protection Mode: MaxPerformance
Members:
PROCDB - Primary database
procstan - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 46 seconds ago)
Dg broker setup is ready and we can do switchover and failover using dgmgrl easily
Note : Info on Databroker configuration it may be differ in your environment like production,testing,development and etc
THANKS FOR VIEWING MY BLOG FOR MORE UPDATES FOLLOW ME OR SUBSCRIBE ME
Nice blog on Dataguard broker configuration set up very informative
ReplyDelete