Oracle Standby - Configure Dataguard Broker
Oracle Standby - Configure Dataguard Broker
In Oracle Standby and Datagard, Data guard Broker manage primary and standby databases
using the SQL command-line interfaces or the Data Guard broker interfaces,
including a command-line interface (DGMGRL) and a graphical user interface that
is integrated in Oracle Enterprise Manager. It can be used to perform:
a) Create and enable Data Guard configurations, including setting up redo transport services and apply services
b) Manage an entire Data Guard configuration from any system in the configuration
c) Manage and monitor Data Guard configurations that contain Oracle RAC primary or standby databases
d) Simplify switchovers and failovers by allowing you to invoke them using either a single key click in Oracle Enterprise Manager or a single command in the DGMGRL command-line interface.
e) Enable fast-start failover to fail over automatically when the primary database becomes unavailable. When fast-start failover is enabled, the Data Guard broker determines if a failover is necessary and initiates the failover to the specified target standby database automatically, with no need for DBA intervention.
Configure Dataguard
Broker
==> Stop the MRP on standby database
==> Modify the Listener.ora files
==> Modify the init Parameters
==> Create Configuration
==> Enable Configuration
==> Verify the Configuration
==> Modify the Listener.ora files
==> Modify the init Parameters
==> Create Configuration
==> Enable Configuration
==> Verify the Configuration
1. Stop the MRP on standby database
alter database recover managed standby database cancel;
2. Modify the Listener.ora files
Update the listener.ora on all the nodes in Dataguard configuration to register a service with the local listener for each instance for the proper functioning of DGMGRL. Add the below lines to the listener.ora file for each of the specified instances.
Update the listener.ora on all the nodes in Dataguard configuration to register a service with the local listener for each instance for the proper functioning of DGMGRL. Add the below lines to the listener.ora file for each of the specified instances.
Primary Node1
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P1)
)
)
Primary Node2
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P2)
)
)
Standby Node1
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_S_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P_S1)
)
)
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P1)
)
)
Primary Node2
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P2)
)
)
Standby Node1
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_S_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P_S1)
)
)
Standby Node2
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_S_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P_S2)
)
)
SID_LIST_LISTENER_TST2P =
(SID_LIST =
(SID_DESC=
(GLOBAL_DBNAME=TST2P_S_dgmgrl)
(ORACLE_HOME=/fd01/TST2P/db/tech_st/11.2.0.3)
(SID_NAME=TST2P_S2)
)
)
After updating these listener.ora files, restart listeners on each of these nodes.
3. Modify the init parameters
STANDBY:
mkdir +TST2P_DATA1/TST2P_S/DATAGUARDCONFIG
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='+TST2P_DATA1/TST2P_S/DATAGUARDCONFIG/dgb_config02.ora' SCOPE=BOTH sid='*';
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+TST2P_DATA1/TST2P_S/DATAGUARDCONFIG/dgb_config01.ora' SCOPE=BOTH sid='*';
alter system set dg_broker_start=true scope=both sid='*';
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+TST2P_DATA1/TST2P_S/DATAGUARDCONFIG/dgb_config01.ora' SCOPE=BOTH sid='*';
alter system set dg_broker_start=true scope=both sid='*';
PRIMARY:
mkdir +TST2P_DATA1/TST2P/DATAGUARDCONFIG
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='+TST2P_DATA1/TST2P/DATAGUARDCONFIG/dgb_config02.ora' SCOPE=BOTH sid='*';
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+TST2P_DATA1/TST2P/DATAGUARDCONFIG/dgb_config01.ora' SCOPE=BOTH sid='*';
alter system set dg_broker_start=true scope=both sid='*';
ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+TST2P_DATA1/TST2P/DATAGUARDCONFIG/dgb_config01.ora' SCOPE=BOTH sid='*';
alter system set dg_broker_start=true scope=both sid='*';
4. Create Configuration
Connect to the DGMGRL and run the below statements to create and enable the DataGuard configuration. Verify that the DG Broker is configured correctly and it has all the databases and instances registered as expected.
CREATE CONFIGURATION 'DG_Config' AS PRIMARY DATABASE IS 'TST2P' CONNECT IDENTIFIER IS 'TST2P';
ADD DATABASE 'TST2P_S' AS CONNECT IDENTIFIER IS TST2P_S;
5. Enable Configuration
enable configuration;
6. Verify Configuration
show configuration;
show database verbose TST2P_S;
show database verbose TST2P;
show instance verbose TST2P1 on database TST2P;
show instance verbose TST2P2 on database TST2P;
show instance verbose TST2P_S1 on database TST2P_S;
show instance verbose TST2P_S2 on database TST2P_S;
show database verbose TST2P_S;
show database verbose TST2P;
show instance verbose TST2P1 on database TST2P;
show instance verbose TST2P2 on database TST2P;
show instance verbose TST2P_S1 on database TST2P_S;
show instance verbose TST2P_S2 on database TST2P_S;
You can learn more about oracle database administration:
Pro Oracle GoldenGate for the DBA
Oracle Security Tools Installation and Configuration
Comments
Post a Comment
Please do not enter any spam link in comment Section suggestions are Always Appreciated. Thanks.. !