Recently I work on a project when I need to communicate with the Oracle database in which I encountered some platform configuration problems. In general, communicate with Oracle is very simple and somewhat similar to SQL Server.
In development phase I didn’t have any problem, but notice that before you start developing you need to make sure that you have BizTalk Adapter Pack installed and Oracle client (or at least Oracle Data Access Components (ODAC) – 32 and 64 bits) installed to use BizTalk Adapter for Oracle in your BizTalk environment.
The BizTalk Adapter Pack consists of the following adapters:
- Microsoft BizTalk Adapter for Oracle Database (Oracle Database adapter).
- Microsoft BizTalk Adapter for Oracle E-Business Suite (Oracle E-Business adapter).
- Microsoft BizTalk Adapter for mySAP Business Suite (SAP adapter). This also includes the .NET Framework Data Provider for mySAP Business Suite (Data Provider for SAP).
- Microsoft BizTalk Adapter for Siebel eBusiness Applications (Siebel adapter). This also includes the .NET Framework Data Provider for Siebel eBusiness Applications (Data Provider for Siebel).
- Microsoft BizTalk Adapter for SQL Server (SQL adapter).
And you can found more information about how to install it here: BizTalk 2013 Installation and Configuration – Installing BizTalk Adapter Pack (Part 12)
The Microsoft BizTalk Adapter for Oracle Database is a Windows Communication Foundation (WCF) custom binding. This binding contains a single custom transport binding element that enables communication with an Oracle database.
The following figure shows part of “BizTalk Oracle Adapter Architecture”:
According to BizTalk official documentation, the support version of Oracle are:
- Oracle database version 11.1,
- Oracle database version 10.2,
- Oracle database version 10.1,
- Oracle database version 9.2
And supported client versions:
- Oracle Data Access Components for Oracle Client 126.96.36.199 with Patch Set 188.8.131.52,
- Oracle Data Access Components for Oracle Client 184.108.40.206
You can read more on how to install the Oracle client here:
As I said earlier, I didn’t have any problem in development phase however in runtime I catch the following error:
The adapter failed to transmit message going to send port “SEND_Oracle” with URL “oracledb://connection”. It will be retransmitted after the retry interval specified for this Send Port. Details:”System.IO.FileNotFoundException: Could not load file or assembly ‘Oracle.DataAccess, Version=220.127.116.11, Culture=neutral, PublicKeyToken=89b483f429c47342’ or one of its dependencies. The system cannot find the file specified.
File name: ‘Oracle.DataAccess, Version=18.104.22.168, Culture=neutral, PublicKeyToken=89b483f429c47342’ —> System.IO.FileNotFoundException: Could not load file or assembly ‘Oracle.DataAccess, Version=22.214.171.124, Culture=neutral, PublicKeyToken=89b483f429c47342’ or one of its dependencies. The system cannot find the file specified.
File name: ‘Oracle.DataAccess, Version=126.96.36.199, Culture=neutral, PublicKeyToken=89b483f429c47342’
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
So I tried to check in the GAC if the correct assemblies were there and I realized that the client had installed a different version of the Oracle Client: Oracle 11g R2.
When installing the Oracle WCF Adapter for BizTalk there is a design-time requirement to use Oracle.DataAccess Version 188.8.131.52.
Official the Oracle 11g R2 is not supported and again according to official documentation, I should use one of the supported clients. However, my client only had access to this version and did not want to use another. Although not officially supported you can connect to Oracle 11g R2 database and use Oracle 11g R2 client with minor configuration adjustments.
One possible solution to fix this problem is configuring Assembly Binding Redirection in the machine configuration file (Machine.config):
- 32-bit: c:\Windows\Microsoft.NET\Framework\[version]\config\machine.config
- 64-bit: c:\Windows\Microsoft.NET\Framework64\[version]\config\machine.config
Note: You should apply this in both 32 and 64-bit machine configuration files.
By using the <assemblyBinding> Element for <runtime> that will contain all the information about assembly version redirection and the locations of assemblies.
In this case, you should apply the following configurations:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" /> <bindingRedirect oldVersion="184.108.40.206" newVersion="220.127.116.11" /> </dependentAssembly> </assemblyBinding> </runtime>
Just to be sure, I add this configuration in both 32 and 64-bit in .NET Framework 2.0 and 4.0 machine configuration files.