dbTalk Databases Forums  

OCI Multiple homes

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss OCI Multiple homes in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kvmanoj@gmail.com
 
Posts: n/a

Default OCI Multiple homes - 05-09-2007 , 04:42 AM






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


Reply With Quote
  #2  
Old   
Carlos
 
Posts: n/a

Default Re: OCI Multiple homes - 05-09-2007 , 05:50 AM






On 9 mayo, 11:42, kvma... (AT) gmail (DOT) com wrote:
Quote:
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
Hello.

Put apropriate aliases in both tnsnames.ora and use the proper connect
string aliases to connect.

HTH.

Cheers.

Carlos.



Reply With Quote
  #3  
Old   
sybrandb
 
Posts: n/a

Default Re: OCI Multiple homes - 05-09-2007 , 06:58 AM



On May 9, 11:42 am, kvma... (AT) gmail (DOT) com wrote:
Quote:
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



Reply With Quote
  #4  
Old   
Carlos
 
Posts: n/a

Default Re: OCI Multiple homes - 05-09-2007 , 08:46 AM



On 9 mayo, 13:58, sybrandb <sybra... (AT) gmail (DOT) com> wrote:
Quote:
On May 9, 11:42 am, kvma... (AT) gmail (DOT) 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
Sybrand, I'm afraid I disagree.

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.



Reply With Quote
  #5  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: OCI Multiple homes - 05-09-2007 , 12:40 PM



On 9 May 2007 06:46:58 -0700, Carlos <miotromailcarlos (AT) netscape (DOT) net>
wrote:

Quote:
Sybrand, I'm afraid I disagree.

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,
I'm afraid I consider this as promoting maintaining messes.
The mess you describe above is the perfect reason to
either set up a central tnsnames.ora or abandon tnsnames.ora
completely and setup OID.
Apparently you never have been in the situation you describe. I have.
I don't want to jump around every individual workstation because
Oracle was upgraded. In fact this was on of the reasons NOT to
upgrade, and to continue to use desupported versions, without a proper
support contract in place.

Sorry to say so, but you shouldn't learn people how NOT to do their
job.

--
Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #6  
Old   
kvmanoj@gmail.com
 
Posts: n/a

Default Re: OCI Multiple homes - 05-10-2007 , 12:53 AM



Hi,

I merged the two tnsnames.ora file and kept in /etc
It worked fine.

It works even though TNS_ADMIN is not set. This we have tried on 10g.

Thanks a lot

Manoj


On May 9, 10:40 pm, sybra... (AT) hccnet (DOT) nl wrote:
Quote:
On 9 May 2007 06:46:58 -0700, Carlos <miotromailcar... (AT) netscape (DOT) net
wrote:

Sybrand, I'm afraid I disagree.

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,
I'm afraid I consider this as promoting maintaining messes.
The mess you describe above is the perfect reason to
either set up a central tnsnames.ora or abandon tnsnames.ora
completely and setup OID.
Apparently you never have been in the situation you describe. I have.
I don't want to jump around every individual workstation because
Oracle was upgraded. In fact this was on of the reasons NOT to
upgrade, and to continue to use desupported versions, without a proper
support contract in place.

Sorry to say so, but you shouldn't learn people how NOT to do their
job.

--
Sybrand Bakker
Senior Oracle DBA



Reply With Quote
  #7  
Old   
Carlos
 
Posts: n/a

Default Re: OCI Multiple homes - 05-10-2007 , 02:11 AM



On 9 mayo, 19:40, sybra... (AT) hccnet (DOT) nl wrote:
Quote:
On 9 May 2007 06:46:58 -0700, Carlos <miotromailcar... (AT) netscape (DOT) net
wrote:

Sybrand, I'm afraid I disagree.

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,
I'm afraid I consider this as promoting maintaining messes.
The mess you describe above is the perfect reason to
either set up a central tnsnames.ora or abandon tnsnames.ora
completely and setup OID.
Apparently you never have been in the situation you describe. I have.
I don't want to jump around every individual workstation because
Oracle was upgraded. In fact this was on of the reasons NOT to
upgrade, and to continue to use desupported versions, without a proper
support contract in place.

Sorry to say so, but you shouldn't learn people how NOT to do their
job.

--
Sybrand Bakker
Senior Oracle DBA
Sybrand:

"Apparently you never have been in the situation you describe."

Yes I have. I know it can be a mess, but my point was I didn't assume
anything (the OP didn't say anything about it, I don't know the OP's
environtment) I only said you must put *appropriate* entries in the
respective tnsnames.ora (no matter if you centralise, or use symbolic
links, or whatever).

Finally, It's quite right what you said, but I was not saying
otherwise (or at least I didn't mean it). I was only NOT assuming any
OP's environment.

BTW: I don't want to start another futile 'war of words'. ;-)

Cheers.

Carlos.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.