DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2001

    Unhappy Database Link - TNS names error

    Hi Chaps,

    I have created a database link to access one database from another.

    Oracle does not give me any error when creating the database link and the entry also exists in the table


    however when I try to insert data from one table to another using an

    INSERT INTO table
    ( columns)
    SELECT column values FROM table@database_link_name

    it gives me an error saying

    ERROR at line 79:
    ORA-12154: TNS:could not resolve service name

    and the error points to the database link name in SQL.

    I cannot understand what TNS names has to do with this... Why is this going to TNS names? The oracle doc does not tell me to create a TNS names entry when I create a DB link? What could be the problem here?
    A farmer learns more from a bad harvest than a good one

  2. #2
    Join Date
    Mar 2001
    You do need to create a tns names entry for the db link. Only way for the databases to talk to each other.

    Last edited by ramaral; 12-10-2002 at 09:29 AM.

  3. #3
    Join Date
    Sep 2002
    couple thing you have to keep in mind

    1. global_name=flase
    2. the TNSnames of the database you connect to have to exist on the server of the database you create the link

    I hope this will help

  4. #4
    Join Date
    May 2001
    The TNS names does exist for both the databases.

    but it still gives the same error. And there are no spelling mistakes or IP address errors, cos I can open the databases and work on them.

    Anything I can do now?

    any help greatly appreciated.
    A farmer learns more from a bad harvest than a good one

  5. #5
    Join Date
    Mar 2001
    one thing that I encountered with that is to specify domain name with the dbname. Have you tried that?

    ie. tnsnames entry

    mine.domain.NET =
    (ADDRESS = (PROTOCOL = TCP)(HOST = buggerit)(PORT = 1521))
    (SID = mine)

    db link

    create database link mine.domain.net
    connect to system identified by manager
    using 'mine.domain.net'

    select * from v$version@mine.domain.net

Posting Permissions

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

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.