![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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. |
#6
| |||
| |||
|
|
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 |
#7
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |