Re: Problems when using distributed SQL??

From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1996/01/02
Message-ID: <4cbmjp$3s8_at_cloner3.netcom.com>#1/1


sabawi_at_ibm.net wrote:

>I am trying to use the 'try before you buy' version on Oracle7 for
>OS/2. I had it set up on two OS/2 nodes connected through TCP/IP.
>The setup was easy and I managed to connect and perform SQL on both
>machines using the other as client or as a server. The installer
>created a 'starter' database which I have been using so far with no
>problem.. Until I tried to perform a distributed SQL request.
 

>Here is the situation:
 

>I create table1 on machine1 and table2 on machine2. I connected
>locally on machine1 and created a "PUBLIC DATABASE LINK
>machine2.domain.org CONNECT TO user IDENTIFIED BY password USING
>'t:machine2.domain.org'"
>The LINK was created OK, however, every time I try to issue the
>SQL statement:
 

>SELECT * FROM table2_at_machine2.domain.org WHERE fname='Alex' AND
>lname='Alex';
 

>I get the following error message:
>ERROR at line 1:
>ORA-02085: database link machine2.domain.org connects to ORACLE.WORLD
 

>I do not know that my database name is ORACLE.WORLD and if it is
>how can I change it to machine2.domain.org.
 

>Thank you for help in advance..Please e-mail me if possible.

Oracle defaults to the "global_names = true" setting. This means that the link name and the instance name in the tnsnames.ora file have to be the same. It also tries to stick that "ORACLE.WORLD" stuff in there. I find it easier to just set GLOBAL_NAMES=FALSE and then it doesn't do any of this. You can set it for all sessions by changing it in the init.ora file, or on a per session basis with "ALTER DATABASE SET GLOBAL_NAMES = FALSE;"

--
Chuck Hamilton
chuckh_at_ix.netcom.com

Never share a foxhole with anyone braver than yourself!
Received on Tue Jan 02 1996 - 00:00:00 CET

Original text of this message