This discussion is archived
5 Replies Latest reply: Feb 11, 2013 12:58 PM by EdStevens RSS

TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES

802461 Newbie
Currently Being Moderated
Hello Guru´s

i have one master database running oracle 11.2.0.1 on uniix hpux. clients have tnsnames to run the application that use this database.

tns is like this:

Prod.appmill.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.20)(PORT = 1522))
)
(CONNECT_DATA =
(SID = prod)
)
)


the standby database is running in another server ip = 192.168.30.25 and the standby database have different ORACLE_SID = prodmill.

when we activate the standby i have to update tns to all clients to run application. i´d like to have this automatic with multiple entries in tns for both servers and both SID then when master site whent down, we open the standby and application will back to work just need maybe close and open again.

thanks for your help.

br
  • 1. Re: TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES
    RobertGeier Oracle ACE
    Currently Being Moderated
    Try to connect using SERVICE instead of SID so you can activate that service where you want.

    If you do that, you can then add multiple addresses, and the client will connect wherever the service is running.

    I would also recommend that you connect using DNS alias instead of IP, then you have another option to failover using DNS.
  • 2. Re: TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES
    802461 Newbie
    Currently Being Moderated
    Hello, thanks to reply, can you provide a sample based on my tns above and informations regarding servers ip and oracle_sids used for master and standby ?

    still not clear for me.

    thanks .
  • 3. Re: TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES
    EdStevens Guru
    Currently Being Moderated
    799458 wrote:
    Hello, thanks to reply, can you provide a sample based on my tns above and informations regarding servers ip and oracle_sids used for master and standby ?

    still not clear for me.

    thanks .
    http://docs.oracle.com/cd/E11882_01/network.112/e10835/tnsnames.htm#i500417

    Look at the section on "Multiple Address Lists"
  • 4. Re: TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES
    802461 Newbie
    Currently Being Moderated
    Hello, thanks to reply.
    that´s the doc i was reading since before i made the post here.

    about address i think i understood , but what about SID ? as i said my standby database has a different SID from Master database, and this is what i´m struggling with.

    thanks a lot for your help.

    br

    Edited by: 799458 on Feb 11, 2013 12:34 PM
  • 5. Re: TNSNAMES CONFIGURATION FOR MULTIPLE DATABASES
    EdStevens Guru
    Currently Being Moderated
    799458 wrote:
    Hello, thanks to reply.
    that´s the doc i was reading since before i made the post here.

    about address i think i understood , but what about SID ? as i said my standby database has a different SID from Master database, and this is what i´m struggling with.

    thanks a lot for your help.

    br

    Edited by: 799458 on Feb 11, 2013 12:34 PM
    As Robert said, don't use SID, use SERVICE_NAME.

    Maybe something like:
    FUBAR = 
     (DESCRIPTION_LIST=
      (DESCRIPTION= 
       (ADDRESS=(PROTOCOL = TCP)(HOST = myprimary)(PORT = 1521))
       (CONNECT_DATA= 
         (SERVICE_NAME=FUBAR_PRI)))
      (DESCRIPTION= 
      (DESCRIPTION= 
       (ADDRESS=(PROTOCOL = TCP)(HOST = mysecondary)(PORT = 1521))
       (CONNECT_DATA= 
         (SERVICE_NAME=FUBAR_SEC)))
    Edited by: EdStevens on Feb 11, 2013 2:58 PM

Legend

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