Search code examples
.netoracle11goracleclient

No Oracle client on my server but an Oracle.dll in my bin directory


This is a really dumb question. But I have a hard time with Oracle and it's .net setup. But, I don't have an Oracle client on my server (Oracle 11g). I do have the ODP.net dll in my bin and lib folders (probably don't need it in both, but it seems to work for now). I am currently getting this exception...

    Oracle.DataAccess.Client.OracleException: The provider is not compatible with the     version of Oracle client
    at Oracle.DataAccess.Client.OracleInit.Initialize()
    at Oracle.DataAccess.Client.OracleConnection..cctor()...

Now I suspect this exception is occuring because I don't have a client on my server... (I have this service on another server that does have a client on it). I don't recall this much trouble working with sql server. But my question is, to access a database (Oracle in this case) programatically in .NET do you need both a client and the appropriate dll?


Solution

  • Unlike SQL Server ADO.Net providers which is completely managed code the ODP.Net assemblies are built on top of native Oracle client libraries. What we do is use the ODP.Net xcopy deployment to install it on the servers. This is relatively simple to do compared to a full oracle client deplyment.