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

Thread: Database Link

  1. #1
    Join Date
    Nov 2000
    Posts
    224

    Question

    I created database link, and when issuing

    select * from ticket@prod where abc='xyz'

    (prod is my database link name)

    it gives me TNS error,
    ORA-12154: TNS:could not resolve service name

    Please let me know how to resolve it.

  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Post the syntax you used to create the dblink. seems you didn't mention the servicename in the link or mentioned service name doesn't exists.

  3. #3
    Join Date
    Nov 2000
    Posts
    224
    create public database link abc.world connect to fshatat identified by howdy using 'aaa.world'

    This aaa.world has an entry in My TNSNAMES.ORA file

  4. #4
    Join Date
    Feb 2001
    Posts
    203
    Hi Sharma,
    put service name in tnsnames.ora(In server) and then create a public database link.
    syntax:
    create public database link <db_link_name>
    connect to user_name identified by password
    using <'service_name'>;

    sree

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,448
    Check Tnsnames.ora in the server where you have created the database link, does prod exist there?

  6. #6
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    <font face=courier>
    create user xxxwebt identified by xxxwebt
    default tablespace users
    temporary tablespace temp
    profile default;

    grant create session to xxxwebt ;

    CREATE DATABASE LINK yyywblnk.world
    CONNECT TO xxxwebt IDENTIFIED BY xxxwebt
    USING 'webzzz.world' ;
    </font>

    "xxxwebt" is user on remote databse
    "webzzz.world" is service name to connect to remote databse.
    "yyywblnk.world" is the link to remote database.

    It works for me. Try figuring out in which step its going wrong.
    Can you sqlplus to remote database using that service name and that user ? If you do you should be fine conecting thru dblink also..

  7. #7
    Join Date
    Nov 2000
    Posts
    224
    It works.

    Thanks SReddy, Sree_Sri, Pando.


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