I have a test environment for a service that my site will be using and a production environment. In my test environment I have ODP.net installed on the server. That service that uses Oracle seems to be running pretty smoothely so far. I don't appear to have an Oracle Client running on that server at all. On the other hand I have a server which has an Oracle client on it, but doesn't appear to have ODP.net installed on it (I am in the process of double checking, but that is the situation as of this S-O question). On the production server I get this exception:
Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
in both servers I have the Oracle.DataAccess dll in the bin and lib folders (don't think I need it in the lib folder, but why rock the boat... I am sure you can come up with a good reason, but not right now!!!). My question is do I need to install ODP.net onto the production server? Has that resolved any issues that you have come across? I have seen some SO post that say this resolved a similar issue for them. Could you recommend a course of action? Thank you!
There are a lot of little sub versions of the oracle client, and what likely happened is that the oracle clients installed on the machine giving the error isn't exactly the same version that the Oracle.DataAccess.dll
file came from.
The best thing to do is make sure you use exactly the same install package on every dev machine and server. This will avoid any missmatch.
As an alternative, what I've done in the past to resolve this (and it may not be the "best" thing to do, but it usually works for me) is to also copy the file OraOps11.dll
to your \bin
directory, along with the Oracle.DataAccess.dll
file.
Get the file from the same oracle install on the same machine where you got Oracle.DataAccess.dll
. It should be in a folder named something like this, depending on where you installed Oracle, and what version:
C:\oracle\product\11.1.0\client_1\bin\OraOps11.dll
This worked for me once i ran them:
OraProvCfg /action:config /product:odp /frameworkversion:v2.0.50727 /providerpath:C:\app\Administrator\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll
OraProvCfg /action:config /product:odp /frameworkversion:v4.0.30319 /providerpath:C:\app\Administrator\product\11.2.0\client_1\ODP.NET\bin\4\Oracle.DataAccess.dll
Good luck
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With