11gR2
Active standby database is running with standby redologs, I’m going to enable
dg broker
Primary
database Unique Name: labtest (jcraju.prod.com)
Standby
database Unique Name: labtests(jcraju.test.com)
Create
configuration files on both primary and standby, which store connection details
and config details
On Primary:
1.
alter system set dg_broker_config_file1='/u01/app/oracle/product/11.2.0_64/dbs/dr1labtestp.dat'
sid='*';
2.
alter system set
dg_broker_config_file2='/u01/app/oracle/product/11.2.0_64/dbs/dr2labtestp.dat'
sid='*';
3.
ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
On Standby:
1.
Stop MRP process and create configuration files
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
2.
alter system set
dg_broker_config_file1='/u01/app/oracle/product/11.2.0_64/dbs/dr1labtests.dat'
sid='*';
3.
alter system set
dg_broker_config_file2='/u01/app/oracle/product/11.2.0_64/dbs/dr2labtests.dat'
sid='*';
4.
ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
5.
Start MRP process
SQL>
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE
DISCONNECT FROM SESSION;
Edit tnsname.ora in both primary and standby with below
connection details,
LABTESTP_DG
=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jcraju.prod.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = labtest)
)
)
LABTESTS_DG
=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jcraju.test.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = labtest)
)
)
From Primary side add configuration details to dg broker:
dgmgrl
/
DGMGRL>
create configuration 'LABTESTP' as primary database is 'labtest' connect
identifier is LABTESTP_DG;
Configuration
"LABTESTP" created with primary database "labtest"
DGMGRL>
add database 'labtests' as connect identifier is LABTESTS_DG maintained as
physical;
Database
"labtests" added
DGMGRL>
show configuration;
Configuration
- LABTESTP
Protection Mode: MaxPerformance
Databases:
labtest - Primary database
labtests - Physical standby database
Fast-Start
Failover: DISABLED
Configuration
Status:
DISABLED
Enable
broker configuration:
DGMGRL>
enable configuration;
Enabled.
DGMGRL>
show configuration;
Configuration
- LABTESTP
Protection Mode: MaxPerformance
Databases:
labtest - Primary database
labtests - Physical standby database
Fast-Start
Failover: DISABLED
Configuration
Status:
SUCCESS
Back ground Process associated with Data guard Broker:
1.
Data Guard Monitor (DMON) –It’s responsible for all broker actions, this
can be enabled or disabled using DG_BROKER_START parameter (default
false)
2.
Broker Resource Manager (RSM) – It’s responsible for handling any
SQL commands used by the broker
3.
Data Guard Net Server (NSVn) – It’s will help RSM process in making
connection with standby side and get result of sql’s
4.
DRCn – This process will resides in standby side and help NSVn
process