Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PO7-- database links
Marc Kannenberg (marc_kannenberg_at_mail.amsinc.com) wrote:
>We are trying to create a database link in Personal Oracle 7. The
>ultimate purpose of this link is to enable us to call stored procedures
>from a remote database. The apparently simple establishment of this
>link, however, is not proving to be simple at all. The name of the
>database instance we are trying to connect to is 'orcl'. We named the
>database on this instance, 'testorcl'. When we try to establish the
>link, PO7 returns the the error message,
> "ORA-02085: 'testorcl.world' connects to 'oracle.world'"
> We named the database link the same as the database to which it is to
>connect as we should, but this error is presented no matter the name of
>the database. Perhaps the instance name, 'orcl' is somehow confused
>with the database name 'oracle'?? Until this problem is identified and
>solved, we apparently cannot establish a link to the instance, 'orcl'.
The rule you are fighting here requires the name of the database link to match the name of the target database. The name of a database is specified by the combination of DB_NAME and DB_DOMAIN in the init.ora parameter file. This is *not* the same as, nor is it related to, the "instance name" or "instance identifier" ("orcl" in your case).
The message quoted above indicates that you created a database link named testorcl in a database whose DB_DOMAIN is world (the default), but the target database was found to have the name oracle.world rather than the expected testorcl.world.
If you name the database link "oracle" then the fullyqualified
dblink name will match the target database
name "oracle.world". This runs insto trouble if you
have created multiple databases with the same DB_NAME,
so, alternatively, you can disable enforcement of the
global names rule by setting GLOBAL_NAMES=FALSE in the
init.ora file of the database where the dblink is defined,
or by issuing
ALTER SESSION SET GLOBAL_NAMES = FALSE
in the session before using the database link.
/b
-- Bill Manry - IBM Products Division - Oracle Corporation These are my opinions, not necessarily Oracle's. Remove "." from "B.Manry" to email me.Received on Tue Aug 05 1997 - 00:00:00 CDT
![]() |
![]() |