Unable to load DLL “OraOps10.dll”

Sudhakar Chavali picture Sudhakar Chavali · Dec 30, 2011 · Viewed 42.5k times · Source

I am running into peculiar issue. I am developing a windows based application which connects to Oracle database.

For initial testings, I have created installer and tested on different machines that I have. Each machine has Oracle Client installed and I did not see any problem in running application.

But when I share this installer with customer, he is getting error "Unable to load DLL OraOps10.dll". When asked he mentioned and has shown the Oracle Client installed on his machine and he is able to run other C# applications which connects to Oracle databases.

I do not understand why my application only getting above error. I even tried suggestions shared at https://forums.oracle.com/forums/thread.jspa?threadID=67364 but still no luck.

I even tried copying executables & DLLs manually on customer's machine. But still facing same issue.

So please help me on what else i can do.

Thanks & Best Regards
Sudhakar Chavali

P.S:

I am using Windows XP operating system and customer is also using same operating system. Both machines are of type 32 bit OS only.

This is the location where customer's oracle client installed: C:\oracle\product\10.2.0\client_1\bin and same is the version in my case too.

We both are using Oracle 10g.

Answer

Codo picture Codo · Dec 30, 2011

The ODP.NET drivers basically consist of two parts. The .NET part and the native OCI part. The error message indicates that the .NET part is working but fails to load the native part.

These issue are likely causes:

  • There's a version mismatch between the .NET part and the native part. Note that OraOps10.dll belongs to Oracle 10g. So the .NET part isobviously of version 10, and it is looking for a native part for version 10.

  • There could be a bitness mismatch. If the .NET part is running in 64 bit mode, it'll be looking for the 64 bit native OCI DLLs. On a 64 bit system, the task manager can tell you whether the process is 32 or 64 bit. 32 bit processes are marked with *32.

  • The registry might not contain the correct path to the native DLLs. ODP.NET will retrieve the value of HKEY_LOCAL_MACHINE\Software\Oracle\ODP.NET\2.xxx.x.x\DllPath to locate the OCI DLLs. Note that the registry is split into a 32 and 64 bit part. Depending on the process looking into the registry, it'll get different values.

It's best if you add all the available information to your question. Is it a 64 bit operating system? Is it a 32 or 64 bit process? Which version of the Oracle client was installed? What directory was the Oracle client installed? Can you see the correct registry entries?