error while connecting using DB link
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: error while connecting using DB link

  1. #1
    Join Date
    Apr 2008
    Location
    bangalore
    Posts
    25

    error while connecting using DB link

    SQL> create public database link DEV.TFAP01.WORLD
    2 connect to ops$tf01 identified by ops
    3 using '(DESCRIPTION =
    4 (ADDRESS_LIST =
    5 (ADDRESS =
    6 (COMMUNITY = TCPIP.world)
    7 (PROTOCOL = TCP)
    8 (Host = 10.171.44.14)
    9 (Port = 1521)
    10 )
    11 )
    12 (CONNECT_DATA =
    13 (SID = TFAP01)
    14 (GLOBAL_NAME = false)
    15 )
    16 )';

    Database link created

    SQL> select distinct brch_code from dbt_m_branch@DEV.TFAP01.WORLD;

    select distinct brch_code from dbt_m_branch@DEV.TFAP01.WORLD

    ORA-02085: database link DEV.TFAP01.WORLD connects to TFAP01.US.DB.COM


    1.when i execute the above query it connects to TFAP01.US.DB.COM
    instead of DEV.TFAP01.WORLD.
    2.The db link TFAP01.US.DB.COM does not exist in the database.

    pls help

  2. #2
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    create statement for "DEV.TFAP01.WORLD" shows it should connect to
    TFAP01 as per connect string you have given. "(SID = TFAP01)"

    Which SID you intend to connect to via "DEV.TFAP01.WORLD"
    Rgds
    Parag

  3. #3
    Join Date
    Apr 2008
    Location
    bangalore
    Posts
    25
    Yes i want to make use of the SID TFAP01 only

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    do you have global_names set to true in the database

  5. #5
    Join Date
    Apr 2008
    Location
    bangalore
    Posts
    25
    im not aware if the global_name is set to true
    but i dropped the dblink and recreated with global_name=true.

  6. #6
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    and now does it work ?
    Rgds
    Parag

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by sadha@dbsupport
    im not aware if the global_name is set to true
    That's the kind of answer I would never accept from any of my guys, go and check global_names parameter!
    Either you are dead lazy or you are clue less ... actually I would prefer the second, there is no cure for the first.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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