Steps To Configure Oracle Data Guard 12.2 For Non-Multitenant Database
Steps To Configure Oracle Data Guard 12.2 For Non-Multitenant Database
by Borys Neselovskyi
This document describes the con guration of the Oracle Data Guard Version 12.2. We
will con gure a standby for a non-multitenant database.
Our test environment consists of two Linux (OEL 7.3) servers: oradg1 and oradg2. I
already created the non-multitenant database on the server oradg1. We will
con gure the standby database on the server oradg2. We will use a new feature of
12.2 by creating a physical standby via dbca – oracle database creation assistant.
Environment overview:
All steps will be executed on the server oradg1 as OS user oracle. Set the environment
and start SQLPlus:
MEMBER
-----------------------------------------------------------------------
/u01/app/oracle/oradata/orcl1/redo01.log
/u01/app/oracle/oradata/orcl1/redo02.log
/u01/app/oracle/oradata/orcl1/redo03.log
— Create:
-- remote_login_password:
SQL> show parameter remote_login_password
-- LOG_ARCHIVE_CONFIG:
SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl1prm,orcl1stb)'
scope = spfile;
-- LOG_ARHIVE_DEST_1:
SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl1prm' scope = spfile;
-- Parameter for Swith- Failover -These parameters take effect when the
primary database is transitioned to the standby role:
SQL> alter system set FAL_SERVER='orcl1stb' scope = spfile;
SQL> alter system set STANDBY_FILE_MANAGEMENT=AUTO scope = spfile;
Now we will restart the database und check parameters:
NAME VALUE
--------------------------------------------------------------------------
log_archive_dest_1 LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=
(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl1prm
log_archive_dest_state_1 enable
log_archive_dest_state_2 enable
fal_server orcl1stb
log_archive_config DG_CONFIG=(orcl1prm,orcl1stb)
log_archive_format %t_%s_%r.dbf
log_archive_max_processes 4
standby_file_management AUTO
remote_login_passwordfile EXCLUSIVE
db_name orcl1
db_unique_name ORCL1PRM
Now we will edit two con guration les: listener.ora and tnsnames.ora:
[oracle@oradg1 dbhome_1]$ cd $ORACLE_HOME/network/admin
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl1prm)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = orcl1)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl1prm_dgmgrl)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = orcl1)
)
)
# Data Guard
ORCL1PRM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradg1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl1prm)
(UR=A)
)
)
ORCL1STB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradg2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl1stb)
(UR=A)
)
)
LISTENER_ORCL1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradg1)(PORT = 1521))
Now we will create the physical standby database on the server oradg2. We will use
oracle database creation assistant – dbca – it is a new feature in the RDBMS 12.2.
dbca -createDuplicateDB
-gdbName global_database_name
-primaryDBConnectionString easy_connect_string_to_primary
-sid database_system_identifier
[-createAsStandby
[-dbUniqueName db_unique_name_for_standby]]
Output:
DATABASE_ROLE
----------------
PHYSICAL STANDBY
SQL> -- remote_login_password:
SQL> show parameter remote_login_password
NAME TYPE VALUE
-----------------------------------------------
remote_login_passwordfile string EXCLUSIVE
Check parameters:
NAME VALUE
------------------------------ ---------------------------------------------
-------------------------------------------------------
db_file_name_convert
log_file_name_convert
log_archive_dest_1 LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=
(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl1stb
log_archive_dest_2
log_archive_dest_state_1 enable
log_archive_dest_state_2 enable
fal_server orcl1prm
log_archive_config dg_config=(orcl1stb,orcl1,orcl1prm)
log_archive_format %t_%s_%r.dbf
log_archive_max_processes 4
standby_file_management AUTO
remote_login_passwordfile EXCLUSIVE
db_name orcl1
db_unique_name orcl1stb
We will con gure the network con guration for a data guard.
[oracle@oradg2]$ cd $ORACLE_HOME/network/admin
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl1stb)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = orcl1)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl1stb_dgmgrl)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/dbhome_1)
(SID_NAME = orcl1)
)
)
# Data Guard
ORCL1PRM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradg1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl1prm)
(UR=A)
)
)
ORCL1STB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradg2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl1stb)
(UR=A)
)
)
Enable the data guard broker via SQLPlus (on both servers: oradg1/oradg2):
Server oradg1:
Server oradg2:
Creating a Data Guard con guration via a tool DGMGRL on the Server oradg1:
Configuration - orcl1
Protection Mode: MaxPerformance
Members:
orcl1prm - Primary database
orcl1stb - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 55 seconds ago)
Database - orcl1prm
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
orcl1
Database Status:
SUCCESS
Database role/status:
Primary:
Standby:
Output standby:
Swithover test
Configuration - orcl1
Protection Mode: MaxPerformance
Members:
orcl1prm - Primary database
orcl1stb - Physical standby database
Output:
Configuration - orcl1
Protection Mode: MaxPerformance
Members:
orcl1stb - Primary database
orcl1prm - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 6 seconds ago)
Advertisements
Teilen mit:
Gefällt mir
Ähnliche Beiträge
Steps to con gure Oracle Data Guard version 12.2 for a pluggable database
In "12c"
WebLogic Server 12.2.1.2.0: Installation on the Linux OEL 7: step by step instruction
In "12c"
Upgrade Grid Infrastructure 12.1 to 12.2 + Install the 2017 August Release Update (RU) on Exadata
In "12c"
Autor: Neselovskyi, Borys
Oracle Database / Middleware / Engineered System Infrastructure Solution Architect
Zeige alle Beiträge von Neselovskyi, Borys
Neselovskyi, Borys / 20. August 2017 / 12c, Allgemein, Architecture, Con guration, Data Guard,
DBCA, HA, High Availability, Howto, RDBMS 12.2 / 12c, advanced con guration, Data Guard, DBCA,
High Availability, Howto, new features, Oracle, RDBMS 12.2, Step by Step
Pingback: Steps to con gure Oracle Data Guard version 12.2 for a pluggable database
– change_on_install … an oracle blog
This site uses Akismet to reduce spam. Learn how your comment data is processed.