Professional Documents
Culture Documents
I will explain Oracle DataGuard Physical Standby Step by Step Installation in this article.
With Oracle DataGuard technology, we can create Physical and Logical Standby for our databases
for providing disaster recovery . I will explain the most used Physical Standby configuration and
setup in Oracle 12c, Oracle 18c database on Linux server.
Before starting installation, I will use db_name ORCL for my Primary database. The name of the
Physical Standby database will be ORCLDG. I will proceed step by step through the configuration
and installation.
Requirements
1- An Oracle Software must be installed on the standby database server, which versions will be the
same as the Primary database and also Patchset versions. (Database must not be created with DBCA
and If your primary database is 12.1.0.2, it must be 12.1.0.2 for Standby database)
2- A Listener must be created on the standby database server that will listen to the physical standby
that will be created by NETCA with Oracle Software.
3- The primary database must be in Archivelog mode. For detailed information about Archivelog
mode, please read the following article. You can find out whether the database is in archive mode
with the following query.
LOG_MODE
------------
ARCHIVELOG
SQL>
4- All changes namely transactions (except TEMP Tablespace) running in the primary database must
be logged and applied to the Standby. The following command must be run in Primary so that all
changes and transactions in the primary database will be logged.
Database altered.
5- If DNS Server is not existed, both hostnames’ and IPs’ should be in their /etc/hosts file.
After making the following parameter change, the database must be closed and opened due to static
parameters. Those who do not know how to close or open the database can read the following article.
7- Take full backup like following and transfer these backup files to the Standby Server.
connect target /
run{
8- Create PFILE, Standby Controlfile and Password File for Standby and Transfer these files to the
Standby Server like following.
9- Add Primary and Standby TNS aliases and TNS informations into tnsnames.ora under
$ORACLE_HOME/network/admin directory like following.
ORCL =
(DESCRIPTION =
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
ORCLDG =
(DESCRIPTION =
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCLDG)
tnsping ORCLDG
tnsping ORCL
sqlplus /nolog
Connected.
Connected.