tnsnames.ora

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Miori

    tnsnames.ora

    Dear all,
    We use TCP/IP for our Oracle networking to the database server but I see
    2 formats for specifying the definition of a connection string of a
    database in tnsnames.ora.

    format 1:
    testdb =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = testdb)
    )
    )

    format 2:
    testdb =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(Host = myhost)(Port = 1521))
    )
    (CONNECT_DATA =
    (SID = test)
    (GLOBAL_NAME = testdb.mydomain )
    )
    )

    What is the difference between these 2 formats, is one for a certain
    Oracle DB version and the other for another version for example? I mean
    when to use which format or are both of them interchangable?

    Many thanks for the replies,
    Miori
  • Artur Karazniewicz

    #2
    Re: tnsnames.ora

    Miori wrote:

    This is for >=9i
    [color=blue]
    > format 1:
    > testdb =
    > (DESCRIPTION =
    > (ADDRESS_LIST =
    > (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
    > )
    > (CONNECT_DATA =
    > (SERVER = DEDICATED)
    > (SERVICE_NAME = testdb)
    > )
    > )[/color]

    This is for Oracle < 9i
    [color=blue]
    > format 2:
    > testdb =
    > (DESCRIPTION =
    > (ADDRESS_LIST =
    > (ADDRESS = (PROTOCOL = TCP)(Host = myhost)(Port = 1521))
    > )
    > (CONNECT_DATA =
    > (SID = test)
    > (GLOBAL_NAME = testdb.mydomain )
    > )
    > )[/color]

    Artur

    Comment

    • mayankparmar2000
      New Member
      • Jun 2006
      • 1

      #3
      Will you please paste your tnsnames.ora here? I get error ORA-12203 TNS: unable to connect to destination

      Comment

      Working...