Forum Discussion
BizTalk 2020 WCF-OracleDB adapter Error
Hi
I tried the suggestions given here.
Still i am stuck with following error:
“Could not load file or assembly 'Oracle.DataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.
The system cannot find the file specified. (Microsoft.Adapters.OracleDB)”
Any suggestions on this?
Tx
Hari
harik98 I would suggest to restart uninstalling previous attempts/unGAC and try the latest 19c unmanaged XCopy client.
https://www.oracle.com/database/technologies/net-downloads.html
Oracle XCopy unmanaged .NET client installation :
If not default location (ORACLE_HOME\network\admin), create a System Environment Variable for :
Name: TNS_ADMIN
Path (change to your location) : c:\oracle\network\admin\
CD C:\Oracle\Setup-19x-32bit
:: Install all to 32-bit folder, 32-bit home name. You can omit the last TNS_ADMIN location parameter if using the default location
install.bat all c:\oracle\ora19c32 ora19c32 true true c:\oracle\network\admin
CD c:\oracle\ora19c32
:: Uninstall 32-bit ORAMTS since we will use the 64-bit ORAMTS and you can only have one ORAMTS running.
uninstall.bat ORAMTS ora19c32
CD C:\Oracle\Setup-19x-64bit
install.bat all c:\oracle\ora19c64 ora19c64 true true c:\oracle\network\admin
:: Then manually add these paths to Path System environment variable
c:\oracle\ora19c64
c:\oracle\ora19c32
:: check GAC
gacutil /l | find /I "4.12"
Oracle.DataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64
Oracle.DataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86
Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL
:: Add AssemblyRedirect in BizTalk .config files and mmc.exe.config for it to use the latest client
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0-4.65535.65535.65535" newVersion="4.122.19.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
- NareshDevallaJun 02, 2023Copper Contributor
harik98 Don't use regular VS cmd to GAC the dlls. You should install dll with: oraprovcfg.exe /action:gac /providerpath:Oracle.DataAccess.dll that supplies to put dll in gac and change machine.config.
- NiklasEJun 05, 2023
Microsoft
NareshDevalla harik98 If you use install.bat the 5th parameter should do the GAC + machine.config also if you set true for this parameter.
--------
Install.batCOMPONENT_NAME: (Required) ODAC component to install and configure. Values: ODPM (Managed ODP.NET), ODP.NET4 (Unmanaged ODP.NET), ORAMTS (Oracle Services for MTS), etc., or ALL (all components).
ORACLE_HOME_PATH: (Required) Directory to install ODAC into. Be mindful if installing to a protected Windows directory, such as C:\Users\<USER NAME>. These directories may have permission restrictions for who can run and which apps can be run.
ORACLE_HOME_NAME: (Required) Unique Oracle Home name.
INSTALL_DEPENDENTS: (Optional) When set to true, the script installs any dependencies the components require. Default value is true.
MACHINE_WIDE_CONFIGURATION: (Optional) When set to true, the script will configure ODP.NET for machine-wide default use. It makes global changes to the machine's .NET setup, including placing the provider assembly into the Global Assembly Cache (GAC) and updating the <i>machine.config</i> with configuration section handler and DbProviderFactory information. This parameter only works for ODPM (Managed Driver for .NET Framework 4) and ODP.NET4 (Unmanaged Driver for .NET Framework 4). Default is false.
TNS_ADMIN_LOCATION: (Optional) Directory that ODAC finds tnsnames.ora and/or sqlnet.ora configuration files. This setting is made in the Windows Registry.