Database Link
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Database Link

  1. #1
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    I created a database link as follows:

    CREATE PUBLIC DATABASE LINK abc
    CONNECT TO scott IDENTIFIED BY tiger USING 'abc';

    It created the link successfully. But when I try to use this link as follows:

    SELECT * FROM tablename@abc

    it shows following error:
    ORA-12154: TNS:could not resolve service name

    I have checked TNSNAMES.ORA. I can connect to this remote database from other places like SQL Plus. I tried by setting global_names to both TRUE and FALSE. But no use. Can somebody help me please?
    Agasimani
    OCP(10g/9i/8i/8)

  2. #2
    Join Date
    Nov 1999
    Location
    Kuwait
    Posts
    122

    Exclamation

    Dear agasimani,

    Before answering to this probelm i have some question to get the clear pic of the netowrk envoirment over there with you.
    1) How are u accessing the db? From Oracle client software or Oracle developer i.e forms, reports?
    2) What is the start in dir. of the SQL which is able to connect to the link? is it with the developer or the ora client part?
    3)Show me the TNSNAMES entry on the board.

    I hope if i get more details i could be able to help you..

    Regards,
    NK

  3. #3
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    I guess you have a sqlnet.ora file ... try creating your DB*Link using abc.world

  4. #4
    Join Date
    Feb 2001
    Posts
    203
    whenever you are connecting database from your client or server oracle will check the name in tnsnames.ora.

    For ex.
    1.You are connecting abc database from your client by using abc connect string in your local tnsnames.ora. No problem You can connect to the database through sqlplus.

    The same step you follow to connect the database xyz by using xyz. No problem, you can connect to the database sqlplus.

    But if you created abc dblink in xyz database to connect abc database then

    you have to add the abc connect string in tnsnames.ora on XYZ database(server) .

    Because dblink will connect another database by using server side tnsnames.ora, Not Client tnsnames.ora.

    But sqlplus always use local tnsnames.ora connect string.
    Good Luck.
    sree

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