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: Database link problem.

Re: Database link problem.

From: Ray Teale <ray_at_REMOVETOREPLYholly.com.au>
Date: Tue, 11 Sep 2001 18:31:23 +1000
Message-ID: <C_jn7.3427$iH4.238729@ozemail.com.au>


I think I've solved my own problem.

The global_names parameter is different on the two machines (select * from global_name);

On machine 1 this is MAC1.XX.COM.AU
On machine 2 this is MAC2

Obviously Oracle picks up the domain qualifier from the global_names value to append to database link. You can change the global_names parameter with an ALTER DATABASE command. I used this to prove the point.

I also discovered that the reason for the inconsistency is that oracle sets the global_name parameter at database creation based on the values of db_name and db_domain in the init.ora. On machine 2 the value of db_domain is not set, hence the global_names gets set to MAC2.

Bit of a trap for new users that one.

Thankyou for your time.

Regards

Ray

"Ray Teale" <ray_at_REMOVETOREPLYholly.com.au> wrote in message news:6Ghn7.3320$iH4.232886_at_ozemail.com.au...
> Sorry - I kicked myself after sending the original for forgetting this :-)
>
> I'm using 8.1.6 for Sun sparc in both cases.
>
>
>
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:tpr569kb71u517_at_news.demon.nl...
> >
> > "Ray Teale" <ray_at_REMOVETOREPLYholly.com.au> wrote in message
> > news:gkgn7.3253$iH4.230513_at_ozemail.com.au...
> > > Hi
> > >
> > > Can anybody explain why the following happens:
> > >
> > > I create a database link called HOST_A on machine 1 as
> > >
> > > 'create database link HOST_A connect to scott identified by tiger
using
> > > 'HOST_A';
> > >
> > > When I check the DB_LINK attribute of the USER_DB_LINKS table the
value
> is
> > > "HOST_A.XX.COM.AU". ie the domain name has been appended to the
database
> > > link name.
> > > Everything is fine and works a treat. I drop the link 'drop database
> link
> > > HOST_A;' without a problem and recreate it again.
> > >
> > > Now on machine 2, if I create the same link and view the DB_LINK value
> in
> > > the USER_DB_LINKS table, it is named just "HOST_A"
> > > I can drop and recreate it the same way.
> > >
> > > The question is: what causes my environment on machine1 to append
> > XX.COM.AU
> > > to the name of the link, and not to the link on machine 2. The
> > tnsnames.ora
> > > and sqlnet.ora files on both machines are identical, I believe.
> > >
> > > Thanks for your help
> > >
> > > Ray
> > >
> > >
> > >
> > >
> >
> > No versions, eh?
> > The behavior changed from one version to another and I don't remember
> when.
> >
> > Regards,
> >
> > Sybrand Bakker, Senior Oracle DBA
> >
> >
> >
>
>
Received on Tue Sep 11 2001 - 03:31:23 CDT

Original text of this message

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