DB_Link on WIN2K
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: DB_Link on WIN2K

  1. #1
    Join Date
    Feb 2001
    Location
    Location: Boston, MA
    Posts
    20

    Question

    I'm having a problem creating a db_link on a WIN2K machine with Oracle 8.1.6. When I create it using the following SQL:

    CREATE DATABASE LINK dw_link
    CONNECT TO dw1 IDENTIFIED BY dw1
    USING 'ORCL';

    I get the following error when I try to access it:

    select count(*) from user_tables@dw_link;
    ORA-02085: database link DW_LINK.LARRY connects to ORCL.LARRY

    LARRY is the machine name that I'm doing this on. The Tnsnames.ora file has the following entry for ORCL:

    orcl =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT=1521)))
    (CONNECT_DATA = (SERVICE_NAME = orcl)
    )
    )

    I don't encounter a problem when I do the same thing on solaris.

    Thanks in advance!

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    // *Cause: a database link connected to a database with a different name.
    // The connection is rejected.
    // *Action: create a database link with the same name as the database it
    // connects to, or set global_names=false.

    Also, I would suggest , try establishing a normal connection and make sure that your connection is perfect. Then, check your database nameing convention and make sure you have done it correctly.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Feb 2001
    Location
    Location: Boston, MA
    Posts
    20
    Thanks for the help! Changing global_names to false worked. When I looked up the error message online, it dodn't mention that.

  4. #4
    Join Date
    Feb 2001
    Posts
    66
    If you want to use global_names=true for another purposes,
    the name of your link [dw_link] must match the name of the USING 'ORCL', so name the link with thee exact USING string(ORCL).

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    [QUOTE][i]Originally posted by m_d_marian [/i]
    [B]If you want to use global_names=true for another purposes,
    the name of your link [dw_link] must match the name of the USING 'ORCL', so name the link with thee exact USING string(ORCL). [/B][/QUOTE]

    No, it is a litle bit different. If GLOBAL_NAMES=TRUE, what has to be the same as the remote database name is the *db link name*, not what you specify in the USING part of the db link creation command.

    So if global name of your remote database is "ORCL.acme.com", and your local db server tnsnames.ora entry for that remote database is named "REMOTE_DB", your create db link command should be:

    CREATE DATABASE LINK orcl.acme.com CONNECT TO user_a IDENTIFIED BY pwd_a USING 'remote_db';
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

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