Benefits of Data Guard Broker
One of the biggest benefits of Data Guard broker is that is centralizes the configuration, management and monitoring of Oracle Data Guard configurations.
Some of the operations that Data Guard broker simplifies are
Create Data Guard configuration between primary and standby databases
Add additional standby databases to existing Data Guard configuration
Mange Data Guard protection modes
Start switchover / failover by just one single command
Automate failover in case of primary not reachable
Monitor redo apply, gaps and data guard performance
Perform all above operations locally or remotely !
1) Stop MRP on standby
=============================
We would like to manage our data guard configuration using Data Guard Broker. Stop MRP and clear Log_Archive_dest_2 parameter
SQL> alter database recover managed standby database cancel;
SQL> alter system set LOG_ARCHIVE_DEST_2='' SCOPE=BOTH;
On primary:
===========
SQL> alter system set LOG_ARCHIVE_DEST_2='' SCOPE=BOTH;
Connect to both databases (primary and standby) and issue the following command
==================================================
ALTER SYSTEM SET dg_broker_start=true; --------Primary
show parameter dg_broker_start;
SQL> show parameter dg_broker
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/18.3.0.0/dbs/dr1ORCL.dat
dg_broker_config_file2 string /u01/app/oracle/product/18.3.0.0/dbs/dr2ORCL.dat
dg_broker_start boolean TRUE
ALTER SYSTEM SET dg_broker_start=true; --------Standby
show parameter dg_broker_start;
SQL> show parameter dg_broker
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/18.3.0.0/dbs/dr1ORCL.dat
dg_broker_config_file2 string /u01/app/oracle/product/18.3.0.0/dbs/dr2ORCL.dat
dg_broker_start boolean TRUE
Register primary with broker
===========================
On primary, connect to DGMGRL utility and register the primary database with broker
dgmgrl sys/*****@ORCL
dgmgrl sys/sys#123@ORCL
Connected as SYSDBA.
Add Primary database:
==========================
DGMGRL> CREATE CONFIGURATION my_dg_config AS PRIMARY DATABASE IS ORCL CONNECT IDENTIFIER IS ORCL;
DGMGRL> show configuration;
Register standby with broker
============================
In the same DGMGRL utility, register standby from primary server itself
Add Standby database:
===========================
DGMGRL> ADD DATABASE ORCLDG AS CONNECT IDENTIFIER IS ORCLDG MAINTAINED AS PHYSICAL;
DGMGRL> show configuration;
Enable Data Guard broker
Once primary and standby are registered, we must enable broker
DGMGRL> ENABLE CONFIGURATION;
DGMGRL> SHOW CONFIGURATION;
DGMGRL> SHOW CONFIGURATION;
Configuration - my_dg_config
Protection Mode: MaxPerformance
Members:
orcl - Primary database
orcldg - Physical standby database
Warning: ORA-16853: apply lag has exceeded specified threshold
Fast-Start Failover: DISABLED
Configuration Status:
WARNING (status updated 12 seconds ago)
Cause: Due to apply lag or transport lag. Check Dataguard configurations for parameter ApplyLagThreshold.
DGMGRL> show database verbose orcl;
Solution
ApplyLagThreshold configurable database property generates a warning status for a logical or physical standby when the database’s apply lag exceeds the value specified by the property.
DGMGRL> edit database ORCLDG set property DelayMins=0;
SOLUTION:
1.Check for the delaymin parametr:
DGMGRL> show database verbose orcldg DelayMins
DelayMins = ‘0’
DGMGRL> show database ORCLDG;
Database - orcldg
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 1 second ago)
Average Apply Rate: 2.00 KByte/s
Real Time Query: OFF
Instance(s):
ORCLDG
Database Status:
SUCCESS
No comments:
Post a Comment