Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TNS entry for 2 databases(Primary/Standby)

Safi QadriNov 2 2015 — edited Nov 5 2015

Hi there,

We have DR Setup and need to give only one TNS entry to our users just in case if Primary DB is switched over to Standby.

Currently we have following:

TPROD=

(DESCRIPTION_LIST=

  (DESCRIPTION=

(ADDRESS=(PROTOCOL=tcp)(HOST=oradb01.fti-nbil.com)(PORT=1521))

   (CONNECT_DATA=

     (SERVICE_NAME=TPROD)))

  (DESCRIPTION=

(ADDRESS=(PROTOCOL=tcp)(HOST=oradb02.fti-nbil.com)(PORT=1521))

   (CONNECT_DATA=

     (SERVICE_NAME=STBTPROD))))

which doesn't allow a connection to current production (at oradb02) if database is switched over to this node, sqlplus connection still tries to make a connect on oradb01 and fails with following error:

ORA-01033: ORACLE initialization or shutdown in progress

Users need to connect to the database whichever is current Primary.

Is there any tnsnames.ora entry or tweak available to achieve this?

Thanks.

Safi

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2015
Added on Nov 2 2015
4 comments
4,355 views