Links
Tags
OraOLEDB.Oracle provider is not registered on the local machine errors.
I was recently working on an Oracle DB project (Windows 10 + Visual Studio 2022) that had a connection string where the "provider=OraOLEDB.Oracle", and the error above "is not registered on the local machine" kept appearing that sent me down a rabbit hole. Here is a summary of the steps needed to install the latest ODAC package to enable OraOLEDB.Oracle as a provider in your .NET Framework / .NET Core solutions.
Step 1. Download an appropriate ODAC Xcopy Package such as ODAC 21c and Latest 64-bit version.
Step 2. Extract the package and complete the following steps as an admin (assuming your install directory is c:\Oracle):
install.bat oledb c:\Oracle\ myhome true true
install.bat odp.net4 c:\Oracle\ myhome true true
install.bat basic c:\Oracle\ myhome true true
Step 3. Add the following System Environment Variables (replacing C:\Oracle with the path to your extracted directory):
- TNS_ADMIN = c:\Oracle\network\admin
- ORACLE_HOME = c:\Oracle
Step 4. Add the following to your PATH System Environment Variable:
- %ORACLE_HOME%
- %ORACLE_HOME%\bin
It's important you get both of these directories added otherwise you will continue to get the 'not registered' errors, despite having gone through the regsvr32.exe process as part of the included install.bat file in Step 2.