Re: OCI Multiple homes

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 9 May 2007 06:46:58 -0700
Message-ID: <1178718418.106242.295220_at_y5g2000hsa.googlegroups.com>


On 9 mayo, 13:58, sybrandb <sybra..._at_gmail.com> wrote:
> On May 9, 11:42 am, kvma..._at_gmail.com wrote:
>
>
>
> > Hi,
>
> > I have 2 Oracle Homes(both 10g) on Linux and each has one Database.
> > I have an Application which uses OCI to connect to DB and fetch data
> > from it.
>
> > When I set the ORACLE_HOME to one of the homes, I am able to connect
> > and fetch the data from that HOME. But I am not able to connect to
> > the other HOME.
>
> > My requirement needs that I need to connect to databases on different
> > homes from my application.
>
> > I have searched OCI documentation help provided by Oracle but couldnot
> > find much about this.
>
> > Can anyone help me in this regard.
>
> > Thanks,
> > Manoj
>
> merge the two different tnsnames.ora files (in each ORACLE_HOME/
> network/admin directory) in /etc/tnsnames.ora and point the env var
> TNS_ADMIN to /etc.
>
> The solution of Carlos will force you to keep those files in sync
> manually.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

[Quoted] Sybrand, I'm afraid I disagree.

[Quoted] [Quoted] Different ORACLE_HOMEs may have different aliases in their respective tnsnames.ora (maybe they will connect to different groups of instances, different environments, etc, etc...)

What I said is that the OP should put the *apropriate* alias in the files and connect using them in the correct way (whatever this way is).

It was you who figured out that the two tnsnames.ora should be the same, not me.

Cheers.

Carlos. Received on Wed May 09 2007 - 15:46:58 CEST

Original text of this message