Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve : Unable to load DLL 'OraOps19.dll': The specified procedure could not be found.?

I have installed the oracle 19 client to build my project. In my registry the dll path is well defined like this

and i've also add <oracle.dataaccess.client><settings><add name="DllPath" value="D:\app\oracle\product\19.0.0\client_1\bin"/></settings></oracle.dataaccess.client>

but i still have the exception

DllNotFoundException: Unable to load DLL 'OraOps19.dll': The specified procedure could not be found.

How can i see the dll path used or resolve the problem ?

like image 427
Armadorae Avatar asked Oct 24 '25 14:10

Armadorae


2 Answers

In my case what resolved the issue was to install C++ Redistributeable:

# ODAC requires the Visual C++ Redistributable for Visual Studio 2015-2022 or later:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; 
Invoke-WebRequest "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"; 
Start-Process -filepath .\vc_redist.x64.exe -ArgumentList "/install", "/passive", "/norestart" -Passthru | Wait-Process; 
Remove-Item -Force vc_redist.x64.exe;

it's an requirement mentioned at the ODAC downloading page

enter image description here

like image 145
Justin Avatar answered Oct 26 '25 09:10

Justin


In my case, the Windows registry had a wrong path to oci.dll. The OraOps19.dll was in the same wrong location.

I managed to catch that only after writing a small console application and analyzing an application running log created by the Process Monitor tool:

Tools - File Summary - ByFolder tree helped to find a record that reads the wrong path value from the Windows registry.

I put the following fixes:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI]
"OracleOciLibPath"="C:\\PATH_TO_YOUR_ORACLE_CLIENT\\bin"

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSDTC\MTxOCI]
"OracleOciLibPath"="C:\\PATH_TO_YOUR_ORACLE_CLIENT\\bin"

It fixed the error.

like image 30
MirrorBoy Avatar answered Oct 26 '25 08:10

MirrorBoy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!