The Listener is running
The LISTENER.ORA includes Data Guard Config
The Database parameter LOCAL_LISTENER is set
There is a Primary database and at least one Standby configured and running
A Wallet has been created containing SYS passwords for Primary and all Standby database instances
sqlplus / as sysdba
ALTER SYSTEM SET dg_broker_config_file1='/u01/app/oracle/dr1ORCL2.dat' SCOPE=both;
ALTER SYSTEM SET dg_broker_config_file2='/u02/app/oracle/dr2ORCL2.dat' SCOPE=both;
NOTE: In the example above the filename includes the DB_UNIQUE_NAME of the database instance.NOTE: Best practice is for these files to exist outside of the ${ORACLE_HOME} directory structure on separate filesystems (ideally separate physical storage) to each other.ALTER SYSTEM SET log_archive_dest_2='' SCOPE=BOTH;
NOTE: For databases before 12c, this step should be skipped.ALTER SYSTEM SET dg_broker_start=true SCOPE=BOTH;
exit
sqlplus / as sysdba
ALTER SYSTEM SET dg_broker_config_file1='/u01/app/oracle/dr1ORCL1.dat' SCOPE=both;
ALTER SYSTEM SET dg_broker_config_file2='/u02/app/oracle/dr2ORCL1.dat' SCOPE=both;
NOTE: In the example above the filename includes the DB_UNIQUE_NAME of the database instance.NOTE: Best practice is for these files to exist outside of the ${ORACLE_HOME} directory structure on separate filesystems (ideally separate physical storage) to each other.ALTER SYSTEM SET log_archive_dest_2='' SCOPE=BOTH;
NOTE: For databases before 12c, this step should be skipped.ALTER SYSTEM SET dg_broker_start=true SCOPE=BOTH;
exit
Start the Broker CLI and create Configuration
dgmgrl /
CREATE CONFIGURATION orcl_dg_config AS PRIMARY DATABASE IS ORCL1 CONNECT IDENTIFIER IS ORCL1;
ADD DATABASE ORCL2 AS CONNECT IDENTIFIER IS ORCL2 MAINTAINED AS PHYSICAL;
ENABLE CONFIGURATION;
(You may need to wait a minute for configuration to show up correctly)SHOW CONFIGURATION;
exit
ALTER SYSTEM SET DG_BROKER_START=FALSE SCOPE=BOTH;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=ORCL2 LGWR ASYNC NOAFFIRM DELAY=0 NET_TIMEOUT=30 REOPEN=300 DB_UNIQUE_NAME=ORCL2 VALID_FOR=(PRIMARY_ROLE,ALL_LOGFILES)' SCOPE=BOTH;
ALTER SYSTEM SET DG_BROKER_START=FALSE SCOPE=BOTH;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=ORCL1 LGWR ASYNC NOAFFIRM DELAY=0 NET_TIMEOUT=30 REOPEN=300 DB_UNIQUE_NAME=ORCL1 VALID_FOR=(PRIMARY_ROLE,ALL_LOGFILES)' SCOPE=BOTH;
CREATE CONFIGURATION orcl_dg_config AS PRIMARY DATABASE IS ORCL1 CONNECT IDENTIFIER IS ORCL1;
ADD DATABASE ORCL2 AS CONNECT IDENTIFIER IS ORCL2 MAINTAINED AS PHYSICAL;
ENABLE CONFIGURATION;
(You may need to wait a few minutes for configuration to show up correctly)dgmgrl /@${ORACLE_SID}
SHOW CONFIGURATION;
dgmgrl /@${ORACLE_SID}
DISABLE CONFIGURATION;
dgmgrl /@${ORACLE_SID}
REMOVE CONFIGURATION;
dgmgrl /@${ORACLE_SID}
SHOW DATABASE ORCL1;
SHOW DATABASE ORCL2;
dgmgrl /@${ORACLE_SID}
SHOW DATABASE VERBOSE ORCL2;
SHOW DATABASE orcl2 'RecvQEntries';
For example, to stop redo apply on ORCL2...
EDIT DATABASE orcl2 SET STATE=APPLY-OFF;
To restart redo apply on ORCL2...
EDIT DATABASE orcl2 SET STATE=APPLY-ON;
EDIT DATABASE orcl1 SET STATE=TRANSPORT-OFF;
EDIT DATABASE orcl1 SET STATE=TRANSPORT-ON;
VALIDATE DATABASE orcl1;
VALIDATE DATABASE orcl2;
InconsistentLogXptProps (Inconsistent Redo Transport Properties)
InconsistentProperties (Inconsistent Database Properties)
LogXptStatus (Redo Transport Status)
LsbyFailedTxnInfo (Logical Standby Failed Transaction Information)
LsbyParameters (Logical Standby Parameters)
LsbySkipTable (Logical Standby Skip Table)
LsbySkipTxnTable (SQL Apply Skip Transaction Table)
RecvQEntries (Receive Queue Entries)
SendQEntries (Send Queue Entries)
TopWaitEvents
Assuming you are running dgmgrl with the ORACLE_SID set to the instance you want to monitor, cut & paste the following as necessary:
echo "'SHOW DATABASE ${ORACLE_SID} InconsistentLogXptProps;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} InconsistentProperties ;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} LogXptStatus;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} LsbyFailedTxnInfo;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} LsbyParameters;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} LsbySkipTable;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} LsbySkipTxnTable;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} RecvQEntries;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} SendQEntries;'" | xargs dgmgrl /@${ORACLE_SID}
echo "'SHOW DATABASE ${ORACLE_SID} TopWaitEvents;'" | xargs dgmgrl /@${ORACLE_SID}
You can install the broker command line interface DGMGRL and run the observer software on computer systems that are separate from the Oracle Data Guard primary and standby systems. It is not necessary to obtain a separate license for a system hosting the observer.
Oracle® Database Licensing Information 11g Release 2 (11.2)Review the DRC log in your diag location...
tail -f /u01/app/oracle/diag/rdbms/$(echo ${ORACLE_SID} | tr '[:upper:]' '[:lower:]')/${ORACLE_SID}/trace/drc${ORACLE_SID}.log
cat /u01/app/oracle/diag/rdbms/$(echo ${ORACLE_SID} | tr '[:upper:]' '[:lower:]')/${ORACLE_SID}/trace/drc${ORACLE_SID}.log
dgmgrl /
validate database orcl2;
dgmgrl -debug /@${ORACLE_SID}