Dataguard - Standby Creation Using DBCA - 12c NewFeature
Dataguard - Standby Creation Using DBCA - 12c NewFeature
Dataguard - Standby Creation Using DBCA - 12c NewFeature
One of the real nice new features in Oracle 12c Release 2 (12.2.0.1) is the ability to create an
Oracle Data Guard Standby Database using DBCA (Database Configuration Assistant). This
really does simplify the process of creating a standby database as well and automates a number
of steps in the creation process which were earlier manually performed.
In this example we will see how a 12.2.0.1 Data Guard environment is created via DBCA and
then Data Guard Broker (DGMGRL).
The source database is called salesdb and the standby database DB_UNIQUE_NAME will be
salesdb_sb.
Primary database host name is host01 and the Standby database host name is host02.
dbca -createDuplicateDB
-gdbName global_database_name
-primaryDBConnectionString easy_connect_string_to_primary
-sid database_system_identifier
[-createAsStandby
[-dbUniqueName db_unique_name_for_standby]]
We will run the command from the standby host host02 as shown below.
Note that the SPFILE and Password File for the Standby Database has been automatically
created
System altered.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 -
64bit Production
[oracle@host01 archivelog]$ dgmgrl
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Fri Mar 17 14:47:27 2017
connect /
Connected to "salesdb"
Connected as SYSDG.
DGMGRL> create configuration 'salesdb_dg'
> as primary database is 'salesdb'
> connect identifier is 'salesdb';
Configuration "salesdb_dg" created with primary database "salesdb"
MEMBER
-----------------------------------------------------------------------------
---
/u03/app/oradata/salesdb/redo03.log
/u03/app/oradata/salesdb/redo02.log
/u03/app/oradata/salesdb/redo01.log
BYTES/1048576
-------------
200
200
200
Database altered.
Database altered.
Database altered.
Database altered.
DGMGRL> connect /
Connected to "salesdb"
Connected as SYSDG.
Database altered.
Database altered.
Database altered.
Database altered.
Database altered.
SQL>
Configuration - salesdb_dg
Configuration Status:
SUCCESS (status updated 8 seconds ago)
Edit listener.ora on primary database host and add the lines shown below. Reload the
listener.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = salesdb_DGMGRL)
(SID_NAME = salesdb)
)
)
Edit listener.ora on standby database host and add the lines shown below. Reload the
listener.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = salesdb_sb_DGMGRL)
(SID_NAME = salesdb)
)
)