dotConnect getting confused between multiple oracle homes

Postby StanislavK » Mon 11 Jan 2010 09:52

Please send us a test project. You may do it via our Contact form:
http://www.devart.com/company/contact.html

We are unable to reproduce the issue.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Re: dotConnect getting confused between multiple oracle homes

Postby cerealjoe » Wed 11 Aug 2010 03:17

Simon C wrote:If you run the following code on a computer with two or more oracle homes installed, the second connection fails as it cannot resolve the connection identifier - it seems it's getting confused between the two oracle homes. This is using dotConnect 5.35.57.0. What am I doing wrong here?

Code: Select all
IList homes = OracleConnection.Homes;

OracleHome home1 = (OracleHome)homes[0];
OracleHome home2 = (OracleHome)homes[1];

string db1 = home1.GetServerList()[0];
string db2 = home2.GetServerList()[0];

using (OracleConnection db1Conn = new OracleConnection {Home = home1.Name, Server = db1, UserId = "xxxx", Password = "xxxx"}) {
    db1Conn.Open();
}

using (OracleConnection db2Conn = new OracleConnection {Home = home2.Name, Server = db2, UserId = "xxxx", Password = "xxxx"}) {
    db2Conn.Open();
}


I think there is no problem at all. But please review the codes first. I think that probably you have a error in some punctuations or spaces. :D
cerealjoe
 
Posts: 3
Joined: Mon 09 Aug 2010 16:47

Postby bernhard.klefer » Wed 08 Dec 2010 19:49

I' having the same problem with dotConnect 6.0.58.

After assigning a home to a OracleConnection instance all other instances will use that same home, even if you assign a differen home to them.

for example:
Code: Select all
using (OracleConnection db1Conn = new OracleConnection {Home = "OraClient11g_home1", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
   try { db1Conn.Open();}
   catch { //This will fail because db1 is not available for home1 }
}

using (OracleConnection db2Conn = new OracleConnection {Home = "OraClient11g_home2", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
   try {db2Conn.Open();}
   catch { //This should work but does also fail }
}


but if you try just the second home it will succeed.
Code: Select all
using (OracleConnection db2Conn = new OracleConnection {Home = "OraClient11g_home2", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
   try {db2Conn.Open();} //This works
   catch { }
}
bernhard.klefer
 
Posts: 5
Joined: Wed 24 Nov 2010 14:52

Postby StanislavK » Thu 09 Dec 2010 17:38

Thank you for your report, we've reproduced the problem. We will investigate it and inform you about the results.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Tue 21 Dec 2010 17:00

We have analyzed the situation, the problem appears to be caused by an error in the Oracle Client 11g implementation. The problem is that the oci.dll assembly of the client uses TNS names of the client that was already used instead of loading its own TNS names.

We can only recommend you to address this issue to the Oracle support.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Previous

Return to dotConnect for Oracle