Professional Documents
Culture Documents
DBA Genesis Support Home Remote DBA Support Books Courses Contact
All Articles Database Administration Performance Tuning DBA Scripts Data Guard More
Configuration Overview
Configuration Overview
Primary details
SID: ip7
ORACLE_HOME: /u01/app/oracle/product/12.2.0.1
SID: ip7
ORACLE_HOME: /u01/app/oracle/product/12.2.0.1
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 1/9
8/29/2021 Oracle Data Guard Configuration With Broker
Primary must run in archive log mode. Check the archive log mode
LOG_MODE
------------
NOARCHIVELOG
Enable force logging on primary: In oracle, users can restrict redo generation for SQL
by using NOLOGGING clause. This NOLOGGING transaction will be a problem for
physical standby. Hence, we force logging so even user uses NOLOGGING clause, every
SQL will be logged on to redo
Create standby log files: You must create standby log files on primary. These files are
used by a standby database to store redo it receives from primary database.
Our primary may become standby later and we would need them, so better to create it.
First check the current log groups
1 1 200 1 INACTIVE
Hi, Need Help?
2 1 200 1 CURRENT
3 1 200 1 INACTIVE
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 2/9
8/29/2021 Oracle Data Guard Configuration With Broker
MEMBER
---------------------------------------------------
/u01/data/db_files/ip7/redo03.log
/u01/data/db_files/ip7/redo02.log
/u01/data/db_files/ip7/redo01.log
Add the standby logfiles, make sure group number should be from a different series like
in this case we choose to start with 11 and above. This helps in easy differentiation.
Make sure to keep the thread# and logfile size exactly same. Oracle also recommends to
always create n+1 standby log files. Where n is the total number of logfiles
Check DB Unique name parameter on primary: Make sure your primary database
has DB_UNIQUE_NAME parameter set for consistency. If it’s not set properly, use ALTER
SYSTEM SET command
Create password file for standby: This is needed for cloning purpose. Even if there is
one password file in $ORACLE_HOME/dbs location, create a new one with standby SID
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 3/9
8/29/2021 Oracle Data Guard Configuration With Broker
Configure Network
vi $ORACLE_HOME/network/admin/tnsnames.ora
ip7 =
(DESCRIPTION =
(ADDRESS_LIST =
(CONNECT_DATA =
(SID = ip7)
ip7_stb =
(DESCRIPTION =
(ADDRESS_LIST =
(CONNECT_DATA =
(SID = ip7)
Configure listener on primary database: Since the broker will need to connect to the
database when it’s down, we can’t rely on auto-registration with the listener, hence the
explicit entry for the database
vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION =
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 4/9
8/29/2021 Oracle Data Guard Configuration With Broker
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ip7_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0.1)
(SID_NAME = ip7)
ADR_BASE_LISTENER = /u01/app/oracle
Configure listener on standby: Since the broker will need to connect to the database
when it’s down, we can’t rely on auto-registration with the listener, hence the explicit
entry for the database
vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ip7_stb_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0.1)
(SID_NAME = ip7)
ADR_BASE_LISTENER = /u01/app/oracle
Once the listener.ora changes are in place, restart the listener on both servers
lsnrctl stop
lsnrctl start
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 5/9
8/29/2021 Oracle Data Guard Configuration With Broker
On standby server
=================
vi /tmp/initip7.ora
*.db_name='ip7'
Create pfile on primary, open it and create the necessary directories on the standby
server
On Primary Server
=================
exit
$ cd $ORACLE_HOME/dbs
$ cat initip7.ora
On Standby Server
=================
mkdir -p /u01/app/oracle/admin/ip7/adump
mkdir -p /u01/data/db_files/ip7
mkdir -p /u01/FRA/ip7
Start the auxiliary instance on the standby server by starting it using the temporary
init.ora file
On Standby Server
=================
$ export ORACLE_SID=ip7
$ sqlplus / as sysdba
SQL> exit;
Duplicate primary database via RMAN: In this step, we will use RMAN to duplicate
primary database for our standby database.
On primary, connect to RMAN, specifying a full connect string for both the TARGET and
AUXILIARY instances. Do not attempt to use OS authentication or the database cloning
will fail
On primary server
=================
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 6/9
8/29/2021 Oracle Data Guard Configuration With Broker
On Standby Server
=================
Enable broker
At this point we have a primary database and a standby database, so now we need to
start using the Data Guard Broker to manage them. Connect to both databases (primary
and standby) and issue the following command
On primary:
===========
On standby:
===========
On primary, connect to DGMGRL utility and register the primary database with broker
On primary:
===========
dgmgrl sys@ip7
Enable configuration
Hi, Need Help?
DGMGRL> ENABLE CONFIGURATION;
Enabled.
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 7/9
8/29/2021 Oracle Data Guard Configuration With Broker
The following commands show how to check the configuration and status of the
databases from the broker. Like how we start / stop MRP manually, we can start / stop
redo apply on standby using broker
===============
dgmgrl sys/sys@ip7
================
How we can manually enable log shipping from primary to standby, the same way we
can use broker to enable log shipping
===============================
dgmgrl sys/sys@ip7
==============================
Data Guard
1,657 views 2
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 8/9
8/29/2021 Oracle Data Guard Configuration With Broker
support@dbagenesis.com
https://www.support.dbagenesis.com/post/oracle-data-guard-configuration-with-broker 9/9