Strange ORA-12154 issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
luc.dobler
Posts: 6
Joined: Thu 24 Mar 2011 08:41

Strange ORA-12154 issue

Post by luc.dobler » Thu 24 Mar 2011 08:59

Hi,

I'm currently stuck by a really strange behavior. I have one existing C# Visual Studio solution I loaded from SVN on to my computer (Win 7 64 bits). It consists of 3 projects, one business layer that has a LINQ to SQL data context implemented one MVC application and one test project.
However I can't connect to the target server, instead I get an ORA-12154 error from either the MVC project or the test project.
I have Oracle client 10g installed

However when I try to connect using sqlplus, it works and when I create a NEW console project, add it to the existing solution and open an OracleConnection it also works. More interesting is that when, from my new console application, I put a reference to the business layer, the data context works perfectly. All projects are using the same Devart assemblies (6.10.121)

Also interesting to denote is that I cannot connect to that database from the Entity Developer (with or without explicitly specifying the oracle home)

I don't understand why I CAN connect from sqlplus and from a new console application but I CAN'T connect from existing application and from Entity Developer.
Is there a way we can enforce the path to oci.dll ? (my PATH contains already the oracle client home location)

Any idea, suggestion ?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 24 Mar 2011 13:00

Could you please specify whether you are using a 32-bit or 64-bit version of Oracle client?

In case the Oracle client is 64-bit, the problem is that 64-bit clients cannot be used within 32-bit applications. Since Entity Developer and Visual Studio are 32-bit, only 32-bit Oracle clients should be used at design-time. As for the MVC application, please check if it is compiled with the 'x86' option; if yes, please try setting this option to 'x64' or 'Any CPU' to use a 64-bit client at run-time.

Also, if you are using dotConnect for Oracle Professional, you can try the Direct connection mode. For the detailed information on the Direct mode advantages and limitations, please refer to
http://www.devart.com/dotconnect/oracle ... tMode.html

luc.dobler
Posts: 6
Joined: Thu 24 Mar 2011 08:41

Post by luc.dobler » Fri 25 Mar 2011 09:11

Hi Stanislav,

I'm using the 32bits version of the Oracle Client. According to the behavior I described I don't know exactly where is the problem because some applications can communicate with the Oracle client and some cannot.

I actually tried the direct mode and it works perfectly, so we decided to switch all our connection string so that they use the direct mode. Moreover we are not affected by the limitations induced by the direct mode.

Thanks for your support and your fantastic product.
Cheers,
Luc

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 25 Mar 2011 13:13

Glad to see that the problem was resolved.

Post Reply