This discussion is archived
5 Replies Latest reply: Dec 19, 2011 6:44 AM by CKPT RSS

Different instance_name for standby DB

resistanceIsFruitful Newbie
Currently Being Moderated
DB version : 11g Release 1
OS : AIX

I am new to Dataguard.
I logged into our standby environment(only one DG env here) Here I noticed that Standby DB's instance name is different than its DB name.
Is this a mandatory requirement for Data guard ? Or is this some kind of mistake ?

We have our Primary DB called sparkamu running in server manhprod201
Our Physical standby DB's name is sparkamu as well, but different instance_name
--- At the primary Side

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PRIMARY

SQL> select name from v$database;

NAME
---------
SPARKAMU

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
sparkamu
At the primary Side the VALUE field from show parameter log_archive_dest_2
SERVICE=sparkmsu VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=sparkmsu
-----At the Standby DB (manhstdby203)
export ORACLE_SID=sparkmsu

Logging  in as sys

SQL> select name from v$database;

NAME
---------
SPARKAMU

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
sparkmsu    -----------------------> Instance Name is different

SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY
-- The primary DB's tnsnames.ora file looks like
############ Primary DB's own tns entry
sparkamu =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (COMMUNITY = tcp.world)
        (PROTOCOL = TCP)(Host =  manhprod201.regcom.net) (Port =  4123))
    )
    (CONNECT_DATA = (SID = sparkamu)
    )
  )



############ TNS entry for DG DB sparkmsu ########

sparkmsu =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (COMMUNITY = tcp.world)
        (PROTOCOL = TCP)(Host =  manhstdby203.regcom.net) (Port =  3163))
    )
    (CONNECT_DATA = (SID = sparkmsu)
    #(CONNECT_DATA = (SERVICE_NAME = sparkamu)
    )
  )

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points