11g R2 Oracle Data Guard Setup for Physical Standby Database

Switching to a DataGuard structure (primary - standby) increases a single instance database's accessibility.

Creation of standby database

Step 1:

Create an rman script, using vi, in the Primary DB, called /home/oracle/CreateStandbyDB.rcv and add the following.

Step 2:

Open the Standby DB in nomount mode.

Step 3:

Make a duplicate of the standby db in the primary db using rman.

 

rman target / auxiliary sys/sys@erp_sby cmdfile=/home/oracle/CreateStandbyDB.rcv log=/home/oracle/Log_CreateStandbyDB.log

 

To view the operations as they execute: tail -f /home/oracle/Log_CreateStandbyDB.log

 

If an error appears, check the connection to the database using the tnsping command: tnsping erpsby (the oracle_uniqname of the standby db)

If the rman command has to be used again, this means that the standby db was created in /Oracle/11G/dbs/. It may be necessary to delete spfileerp.ora.

Step 4:

Control

Views to check the status

Step 1:

Step2:

Step 3:

In the Standby DB

In the Primary DB

Step 4:

In the Standby DB

It’s necessary to run the following command after opening the Standby DB.

 

Conclusion

This article will help you to setup the physical standby database successfully and make sure the high availability criteria of database are taken care of. We have explained the scenarios of Switchover in a subsequent article.

<<Configuration of SQL*NET

Useful resources for further reading:

http://docs.oracle.com/cd/E11882_01/backup.112/e10642.pdf

http://www.troug.org/?page_id=42 (Uğur İnal)

Create Standby Database using 11g DUPLICATE FROM ACTIVE DATABASE

Note: Only Open Source software was used to write this article (free open source software)

The operating system on the Host Machine: Ubuntu 11.10 X64

Virtual Machine application: VirtualBox 4.1.2

Design Software: Dia (https://wiki.gnome.org/Apps/Dia)

Text Editor: Gedit and Open Office