Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: db link help needed
Hi Aric,
This is caused by global_dbname = true in your initorcl.ora. In this case
every database in your network must have an unique name. Also, the name of
the database link MUST equal the name of the database.
The problem here is apparently both databases have the same name though they
reside on different servers. Probably they will never link correctly, not
even when you make sure global_dbname = false.
Your first shot: try whether it will work with global_dbname = false. My bet
is: it won't work.
Best setup for linked databases in my experience is:
make sure you have different databases and uses 'real' tcp/ip domains
instead of dummy ones (world)
make sure there is a public database link (NB If you setup Oracle Names
[don't know how many databases you have] this is taken care of by Oracle
Names)
create public database link blabla using 'blabla_at_arcounsultinginc.com'
(where blabla of course is the TNS descriptor AND the database name AND the
SID of the remote database, they should all be the same for this to work).
NO username NO password. If usernames and passwords are the same in both
databases, they will connect automatically.
You only need a fully qualified private database link to supplement the
public when usernames and passwords are different.
Hth,
Sybrand Bakker, Oracle DBA
Aric Rosenbaum wrote:
> I'm trying to setup a database link between two O7.3 servers by issuing
> the following:
>
> CREATE DATABASE LINK AspenOracle7 CONNECT TO scott IDENTIFIED BY
> tiger USING 'AspenOracle7';
>
> However, when I'm logged into another the "other" server and issue a
> query such as:
>
> SELECT * FROM scott.dept_at_aspenoracle7;
>
> I get the following error message:
>
> ORA-02085: database link ASPENORACLE7.WORLD connects to ORACLE.WORLD
>
> FYI - The two servers are named ASPEN and CHAMONIX w/ TNS names setup
> for AspenOracle7 and ChamonixOracle7. Both instances have a SID of
> ORCL.
>
> How can I get this to work? Thanks in advance.
>
> -- Aric
Received on Tue Oct 13 1998 - 16:20:15 CDT