Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    3

    Unanswered: DATABASE LINK error.

    Hello,

    i have the following problem:

    using two Oracle Servers, i can connect to both of them through the entries in my TNSNAMES.ORA. Wonderful!

    When i now try to CREATE a DATABASE LINK from one Server to the other, i fail in both directions.

    Whenever i try to use a table from the remote database, i get

    "ORA-12154: TNS:could not resolve the connect identifier specified"

    this is my DB link:
    Code:
    CREATE DATABASE LINK DB64 CONNECT TO bla
                                      IDENTIFIED BY bla
                                      USING 'DB64';

    this is my TNSNames.ora:
    Code:
    DB64 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = HERMES)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = DB64)
        )
      )
    I can connect to DB64 using SQL+ Worksheet, i can connect to the other server using SQL+ Worksheet, I can connect to both servers using an OLEDB connection.

    I didn't misspell anything. Both servers are in the same domain. I spent hours looking for clues. I read the troubleshooting manuals. I am not posting problems easily. What am i doing wrong?

    Oh yes, i almost forgot: One server is Oracle 9i, one server is Oracle 10g. Don't ask why. If this is the problem, just say so.

    Thanks a lot,
    kind regards.
    Jo

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Sorry if I am mistaken, but it sounds like you can connect to both servers from your workstation. Have you tried connecting to the linked server from the linking server? i.e. direct server to server connection?

  3. #3
    Join Date
    Aug 2008
    Posts
    3
    Hi,

    well, i tried at once after reading Your question...

    I found out that the connection only works if the TNSNAMES entry does not match the service name?

    Code:
    DB64 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = HERMES)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = DB64)
        )
      )
    would not work...

    Code:
    DB643 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = HERMES)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = DB64)
        )
      )
    would work fine!

    Now that i use this TNSNAMES entry for the database link, this one also works. Well, from the 10g server to the 9i server, but not vice versa. I can live with this.

    Your question solved my problem, i guess, but what i found out leaves me startled...

    Thanks anyway!
    Jo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •