简体   繁体   中英

ODP.NET: The provider is not compatible with the version of Oracle client

First of all, I want so say I read the other questions and none of them helped me.

The server where I'm getting this error is a Windows 2003 SP2 + .net framework 4.0 + Oracle i9 client

I have downloaded the latest ODP.NET ODAC1120320Xcopy_32bit.zip a copied these dll out.

  • oci.dll
  • ociw32.dll
  • Oracle.DataAccess.dll
  • orannzsbb11.dll
  • oraocci11.dll
  • oraociei11.dll
  • OraOps11w.dll

I've created a little app which just connects to an oracle. link

And when I run this app I'm getting the The provider is not compatible with the version of Oracle client error.

On the download page was also written : Each 32-bit ODAC client download below supports connectivity to Oracle Database versions 9.2, 10.1, 10.2, and 11.1, and 11.2.

So I guess I should be fine with my 9i database.

I'm not sure if I should use some older ODP.NET version. One answer here on SO sugested to use version 11.1.0.6.20 which supports the .NET 2.0 but my application is written against .NET 4.0.

What can I do ?

I'm unaware of any supported method of running an oracle client without some sort of install (the xcopy version includes a batch file for installation so the "xcopy" is a bit of a misnomer.

That said, if you're going to do something that's unsupported, you might as well go with something that WILL eventually be supported - the 100% managed provider (meaning no extra unmanaged dlls to copy) is currently in beta: http://www.oracle.com/technetwork/database/windows/downloads/odpmbeta-1696432.html

I am suborn to see something to the end even for just the learning experience so I'd understand if you wanted to see your current way to fruition. The oracle documentation does indicate that the application directory is in fact first in the unmanaged dll search order. My guess is that additional dlls are needed (you are using a newer version than your linked article). I would see which specific dlls it's loading from outside of your app directory using a tool like Process Monitor and see if you can find the equivalents from the new ODAC to copy over.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM