Data Guard Setup …its a recap

The intent of this section is to illustrate the build of the physical standby (disaster recovery) database from a production database.  For this scenario both databases will reside on the 1 physical server.

This section assumes that the Oracle Grid Infrasturcture, either Standalone or Cluster configuration is installed on both the primary host and standby host.  Additionally, the primary and standby databases will reside in an ASM diskgroup.   The primary database, VNA is currently in open mode.  The db_unique_name of the physical standby database is VNADR

The detailed doc is download-able here:    dataguardbook-11204setup

DATAGUARD CONFIGURATION

Building the Physical standby Database

  1. Add entries to tnsnames.ora for the VNA database and the DR database VNADR to both the primary database host and the DR database host.

 

VNA=

  (DESCRIPTION=

     (ADDRESS=(PROTOCOL=tcp)(HOST=dallas.viscosityna.com)(PORT=1532))

     (CONNECT_DATA=

       (SID=VNA)

     )

   )

 

VNADR = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.9.168)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = VNADR ) ))

 

  1. Add listener entry and reload the listener.

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = VNADR)

      (SID_NAME = VNADR)

      (ORACLE_HOME = /u001/app/oracle/product/11.2.0.4/db_2)

    )

  )

 

[oracle@dallas admin]$ lsnrctl reload listener

 

LSNRCTL for Linux: Version 11.2.0.4.0 – Production on 11-JUL-2014 15:39:16

 

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

 

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

The command completed successfully

  1. An entry for for VNADR will need to added to /etc/oratab on the DR database host.

# This file is used by ORACLE utilities.  It is created by root.sh

# and updated by either Database Configuration Assistant while creating

# a database or ASM Configuration Assistant while creating ASM instance.

 

# A colon, ‘:’, is used as the field terminator.  A new line terminates

# the entry.  Lines beginning with a pound sign, ‘#’, are comments.

#

# Entries are of the form:

#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:

#

# The first and second fields are the system identifier and home

# directory of the database respectively.  The third filed indicates

# to the dbstart utility that the database should , “Y”, or should not,

# “N”, be brought up at system boot time.

#

# Multiple entries with the same $ORACLE_SID are not allowed.

#

+ASM:/u001/app/11.2.0.4/grid:N

VNADR:/u001/app/oracle/product/11.2.0.4/db_2:N

 

  1. The Oracle password file should be copied from the primary database to the DR database server.

 

[oracle@dallas admin]$ scp dallas.viscosityna.com:/u01/app/oracle/product/11.2.0/VNA/dbs/orapwVNA /u001/app/oracle/product/11.2.0/db_2/dbs/orapwVNADR