DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: db link is not active

  1. #1
    Join Date
    Aug 2000
    Posts
    163

    Unhappy

    I can connect to a remote db via sqlplus but unable through db link. When trying to use sqlplus to retrieve something from some table the error says:'Unable connect to connect to destination. When testing through gui tool it says:'db link is not active'.
    What can possibly create a problem?
    Your help would be greatly appreciated.

  2. #2
    Join Date
    Oct 2000
    Location
    Cambridge, MA (Boston)
    Posts
    144
    mary, if you post the definition of the db link and how you connect successfully thru SQLplus, that will help us figure out the trouble.

    d.

  3. #3
    Join Date
    Aug 2000
    Posts
    163

    Unhappy more info

    My db link was created by using the following syntax:
    create public database link (db link name)
    connect to (user name) identified by (password)
    using '(service name the way it is in tnsnames.ora)';
    I am connecting by using
    connect username/password@service name the way it is in tnsnames.ora;

  4. #4
    Join Date
    Oct 2000
    Location
    Cambridge, MA (Boston)
    Posts
    144
    are you using the db link as
    select ...
    from [owner.]tablename@dblinkname ...?

    i ask because a common mistake is to use the connect string where one should use the dblinkname.

  5. #5
    Join Date
    Aug 2000
    Posts
    163
    I am using db link name.
    Example:
    select * from table_name@db_link_name;

  6. #6
    Join Date
    Aug 2000
    Posts
    163

    syntax

    I am using db link name.
    Example:
    select * from table_name@db_link_name;

  7. #7
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Two things to check:

    In order to use the dblink name what you wanted you need to have global_names init.ora set to False.

    Otherwise you have to use your dblink name that matches your connection string.
    Reddy,Sam

  8. #8
    Join Date
    Aug 2000
    Posts
    163
    Shreddy,
    I didn't find actual entry in my init.ora file.
    However, this is what I found in V$parameter.
    select value, isdefault from v$parameter where name='global_names';
    VALUE ISDEFAULT
    --------------------------------------
    FALSE TRUE
    I assume FALSE would be the real value of global_names. What is isdefault column showing?

  9. #9
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    If its fault you should be ok to connect. Here is thread on little syntax and symantics on dblink see where its going wrong.

    [url]http://www.dbasupport.com/forums/showthread.php?threadid=6584[/url]
    Reddy,Sam

  10. #10
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Are you using the schma woner as qualifier for selecting data on rempte database ?

    select * from xyz.table01@link_name.world
    Reddy,Sam

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