=======================================================================
Setup DGMGRL
=======================================================================
1) dg_broker_config_file1 and dg_broker_config_file2 on all instances of primary and standby:
alter system set DG_BROKER_CONFIG_FILE1 = '+DG_HMWHIST_01/ATEST/DGBROKER/dr1ATEST.dat' scope=both sid='*';
alter system set DG_BROKER_CONFIG_FILE2 = '+DG_HMWHIST_01/ATEST/DGBROKER/dr2exitATEST.dat' scope=both sid='*';
(default location of broker configuration file is $ORACLE_HOME/dbs )
Create directory for DG_BROKER in ASM:
amscmd
cd +DG_HMWHIST_01/ATEST
mkdir DGBROKER
For STBY database:
alter system set DG_BROKER_CONFIG_FILE1 = '+DG_HMWHIST_01/ATEST_STBY/DGBROKER/dr1ATEST.dat' scope=both sid='*';
alter system set DG_BROKER_CONFIG_FILE2 = '+DG_HMWHIST_01/ATEST_STBY/DGBROKER/dr2exitATEST.dat' scope=both sid='*';
2) Enable broker on both primary and standby:
alter system set DG_BROKER_START=TRUE scope=both sid='*';
ps -ef | grep dmon ==> Check dgmgrl is running or not
3) Create configuration on primary:(Use DB_UNIQUE NAME):
dgmgrl> connect sys/password
dgmgrl> CREATE CONFIGURATION 'PROD_CONF' AS PRIMARY DATABASE IS 'pri_db_UNIQUE_NAME' CONNECT IDENTIFIER IS PRI_DB_CONNECT_STRING;
Example:
CREATE CONFIGURATION 'TEST_CONF' AS PRIMARY DATABASE IS 'ATEST' CONNECT IDENTIFIER IS ATEST;
4) Add standby in the configuration (Use DB_UNIQUE NAME):
dgmgrl> ADD DATABASE 'stby_db_UNIQUE_NAME' AS CONNECT IDENTIFIER IS STBY_DB_CONNECT_STRING MAINTAINED AS PHYSICAL;
Example:
ADD DATABASE 'ATEST_STBY' AS CONNECT IDENTIFIER IS ATEST_STBY MAINTAINED AS PHYSICAL;
5) Enable Configuration:
dgmgrl> ENABLE CONFIGURATION;
Any error: Check dmon log file:
/u01/app/oracle/diag/rdbms/atest_stby/ATEST/trace> tail -f drcATEST.log
6) Use the SHOW command to verify that the configuration and its databases were successfully enabled:
dgmgrl> SHOW CONFIGURATION;
SHOW DATABASE VERBOSE 'ATEST'
SHOW DATABASE VERBOSE 'ATEST_STBY'
show database 'ATEST' statusreport;
show database 'ATEST_STBY' statusreport;
show database 'ATEST' InconsistentProperties
show database 'ATEST__STBY' InconsistentProperties
Setup DGMGRL
=======================================================================
1) dg_broker_config_file1 and dg_broker_config_file2 on all instances of primary and standby:
alter system set DG_BROKER_CONFIG_FILE1 = '+DG_HMWHIST_01/ATEST/DGBROKER/dr1ATEST.dat' scope=both sid='*';
alter system set DG_BROKER_CONFIG_FILE2 = '+DG_HMWHIST_01/ATEST/DGBROKER/dr2exitATEST.dat' scope=both sid='*';
(default location of broker configuration file is $ORACLE_HOME/dbs )
Create directory for DG_BROKER in ASM:
amscmd
cd +DG_HMWHIST_01/ATEST
mkdir DGBROKER
For STBY database:
alter system set DG_BROKER_CONFIG_FILE1 = '+DG_HMWHIST_01/ATEST_STBY/DGBROKER/dr1ATEST.dat' scope=both sid='*';
alter system set DG_BROKER_CONFIG_FILE2 = '+DG_HMWHIST_01/ATEST_STBY/DGBROKER/dr2exitATEST.dat' scope=both sid='*';
2) Enable broker on both primary and standby:
alter system set DG_BROKER_START=TRUE scope=both sid='*';
ps -ef | grep dmon ==> Check dgmgrl is running or not
3) Create configuration on primary:(Use DB_UNIQUE NAME):
dgmgrl> connect sys/password
dgmgrl> CREATE CONFIGURATION 'PROD_CONF' AS PRIMARY DATABASE IS 'pri_db_UNIQUE_NAME' CONNECT IDENTIFIER IS PRI_DB_CONNECT_STRING;
Example:
CREATE CONFIGURATION 'TEST_CONF' AS PRIMARY DATABASE IS 'ATEST' CONNECT IDENTIFIER IS ATEST;
4) Add standby in the configuration (Use DB_UNIQUE NAME):
dgmgrl> ADD DATABASE 'stby_db_UNIQUE_NAME' AS CONNECT IDENTIFIER IS STBY_DB_CONNECT_STRING MAINTAINED AS PHYSICAL;
Example:
ADD DATABASE 'ATEST_STBY' AS CONNECT IDENTIFIER IS ATEST_STBY MAINTAINED AS PHYSICAL;
5) Enable Configuration:
dgmgrl> ENABLE CONFIGURATION;
Any error: Check dmon log file:
/u01/app/oracle/diag/rdbms/atest_stby/ATEST/trace> tail -f drcATEST.log
6) Use the SHOW command to verify that the configuration and its databases were successfully enabled:
dgmgrl> SHOW CONFIGURATION;
SHOW DATABASE VERBOSE 'ATEST'
SHOW DATABASE VERBOSE 'ATEST_STBY'
show database 'ATEST' statusreport;
show database 'ATEST_STBY' statusreport;
show database 'ATEST' InconsistentProperties
show database 'ATEST__STBY' InconsistentProperties
No comments:
Post a Comment