Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using database links to connect to a local database

Re: Using database links to connect to a local database

From: Bill Manry <BManry_at_nomail.us.oracle.com>
Date: 1998/03/16
Message-ID: <350c9650.347604839@newshost.us.oracle.com>#1/1

On 15 Mar 1998 05:23:46 GMT, "Dick Willis" <rmw_at_synchrony.com> wrote: [...]
>Whenever I reference the local database in my SQL string, I receive the
>error:
> ORA-2085 database link TREND02.World connects to TREND.WORLD.
>
>I have defined the link TREND02 to be the local database. What is TREND?
>(local instance is called TRND (not TREND), but INTERNAL does have the
>password TREND, can't think of other places where TREND is used) and, more
>importantly, how do I construct a database link to the local database so
>that my general-purpose query can be used?

TREND is the name of the database; it is specified in the CREATE DATABASE statement and optionally in the init.ora parameter file. Apparently you are running with init.ora parameter GLOBAL_NAMES set to TRUE, which imposes a requirement that a database link name exactly match the database name. You can change the parameter, change the dblink name, or change the database name to get rid of your ORA-2085.

By the way, last time I checked there were no special optimizations for "loopback" dblinks such as you are using. Since dblinks involve extra processing (due to transaction coordinating requirements) you might want to look at designs that avoid them for the local case.



Bill Manry - IBM Products Division - Oracle Corp. USA These are my opinions, not Oracle's. Received on Mon Mar 16 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US