Re: Which TNSNAMES.ORA is active?

From: Burt Peltier <burttemp1REMOVETHIS_at_bellsouth.net>
Date: Fri, 23 Jul 2004 00:34:36 -0500
Message-ID: <ur1Mc.24353$Yw3.21288_at_bignews3.bellsouth.net>


A non-Oracle script modifying the "primary" tnsnames.ora file. Yikes!

Seems like a mistake to me to "modify" Oracle primary config files with a script or program.

If you really need to modify the tnsnames.ora file, then I think you can just create your own tnsnames.ora in the directory where your script or program runs from.

The tnsnames.ora in the current directory could have just 1 entry for your "new" database. Entries in a tnsnames.ora in the current directory of a program will add to the entries of a primary tnsnames.ora (no matter where it is) or it will override existing entries in the primary copy.

I don't know if I saw this documented or from a trace file. But, it definitely works on windows.

And on Unix, you can do the same thing, but the file name of tnsnames.ora must begin with a "." for a "hidden file" ( $HOME/.tnsnames.ora ) . Also, it must reside in the $HOME of the Unix account.

-- 

"Saqib Ali" <saqib_at_stonebeat.org> wrote in message
news:d22b4f0d.0407211243.7717a40c_at_posting.google.com...

> Hello All,
>
> I am creating an Installation Script that installs an application and
> makes a few changes to the tnsnames.ora file. Our users have multiple
> TNSNAMES.ORA files on their computers. How can I determine which
> TNSNAMES.ORA file is the active one (the one which is being used
> Oracle OLE to connect)?
>
> Thanks.
> Saqib Ali
> http://validate.sf.net Online DocBook XML -> HTML/PDF Convertor
Received on Fri Jul 23 2004 - 07:34:36 CEST

Original text of this message