Oracle Physical Standby Data guard in 11g

Share via:

Dear Readers,
In this article, you will get to know the Oracle Physical Standby Dataguard step by step configuration in 11g.

Required Parameters to configure the Oracle Physical Standby Dataguard setup:-

DB_NAME= It should be the same on the primary and standby side.

DB_UNIQUE_NAME= Must be different on the primary and dr side.

LOG_ARCHIVE_CONFIG= This parameter includes db_unique_name which is the part of data guard configuration.

LOG_ARCHIVE_DEST_n=  It defines the local and remote archive log file location.

LOG_ARCHIVE_DEST_STATE_n= It defines the state of archiving (enable or differ).


FAL_SERVER= Use for archive log gap resolution (required only in physical standby server).

DB_FILE_NAME_CONVERT=  It is required when directory structure is needed to be in the different datafile.

LOG_FILE_NAME_CONVERT= It is required when directory structure is needed to be in the different logfile.

STANDBY_FILE_MANAGEMENT= It helps to create the file automatically on the standby server.

In this demonstration, I am using the below names of primary and standby databases.

primary DB_NAME=prod

primary DB_UNIQUE_NAME=prod

standby DB_NAME=prod

standby DB_UNIQUE_NAME=dr

Now let’s start the configuration.

Primary Server Configuration: –

Step : 1 On the primary server, check the archive mode of the database, It should be in archive log mode.

Note: – I can see from the above output, my database is in archive log mode. If it is not in archive mode then we need to change manually through the below steps.

Step  2 :

Now check the logging mode of the database, It should be force_logging mode.

Step 3:

Now check the db_name and db_unique_name of the primary server.

Step 4:

Now make the db_unique_name to be the part of the data guard configuration using below command.

Step 5:

Now set the archivelog destinations.

Step 6:

Now set remote login password to exclusive.

Step 7:

Now set falserver and file name convert parameters.

Step 8:

Now Configure the listener and tnsnames entries on the primary server.

Listener  file Output: –

Step 9:

Now take a backup of the primary database using RMAN utility.

Command: – backup database plus archivelog;

Step 10:

Now we need to create the standby control file and pfile.

Note: – After creating the pfile, we need to modify the pfile and create the necessary directory as per the requirement on the standby server.

Below are some mandatory changes which required on the standby server.

1) change db_unique_name

2) changefal_server

3) changelog_archive_dest_n

4) Make a directory on the standby server like adump, controlfile path directory, flash recovery directory.

Step 11: Now we need to copy backup set, archivelog, pfile, standby controlfile and password file to standby database.

Control File: –

Now copy the content of control01.ctl control file to other control files to make it sync on the standby server.

Backup set and archivelog: –

parameter file: –

Remote login password file: –

Note: – We need to change the password file from orapwprod to orapwdr on the standby server.

Log in to the standby server and go to the ORACLE_HOME/dbs location and run the below command.


Physical Standby Server Configuration: –

Step 12: Now create the listener and tnsnames entry for standby database as well and update /etc/oratab file.

Step 13:

Now create spfile from the pfile file which we were transferred from primary to the standby server.

Step 14 :

Now restore the backup file on the standby server using RMAN utility.

Step 15 :

Now we can create standby redo log file on both the side to transfer the archive from primary to standby server using the current log file.

Make sure you will create standby redo log file as same size as online redo log file.

Standby side: –

Primary Side: –

Step 16:

Now start the redo applies process on standby server using below command.

Step 17 :

Now on the primary server check the latest archive log and force a log switch.

Now on the physical standby server check the latest archive log has been applied or not.

As we can see from the above output, the archive has been applied successfully to the standby server.

Step 18:

Now we can check the DB name, DB unique name, role, mode of both the servers.

Primary Server Output: –

Standby Server Output: –

Thank you for giving your valuable time to read the above information.
Follow us on 
Facebook Page KTExperts Facebook
Linkedin Page : KT EXPERTS Linkedin


Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Add Comment