Page 2 of 2

Posted: Mon 11 Jan 2010 09:52
by StanislavK
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.

Re: dotConnect getting confused between multiple oracle homes

Posted: Wed 11 Aug 2010 03:17
by cerealjoe
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

Posted: Wed 08 Dec 2010 19:49
by bernhard.klefer
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 { }
}

Posted: Thu 09 Dec 2010 17:38
by StanislavK
Thank you for your report, we've reproduced the problem. We will investigate it and inform you about the results.

Posted: Tue 21 Dec 2010 17:00
by StanislavK
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.