This guide aims to help you on how to configure a clean and lightweight Oracle Client with .NET Framework. This guide is intended for legacy applications that are bound with classic Oracle.DataAccess. It is recommended to move on to Oracle.ManagedDataAccess.
32 bits version
http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html
ODAC 11.2 Release 6 (11.2.0.4.0) [Released January 14, 2014]
64 bits version
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
64-bit ODAC 11.2 Release 6 (11.2.0.4.0) Xcopy for Windows x64 [Released January 14, 2014]
First, make sure you don't have any previous installations, remove all tracks of oracle, look into program files, windows registry, environment variables and file system. Having multiple versions of oracle client might cause incompatibilities. Backup your TNS before removing previous versions.
Then, extract the xcopy package you downloaded from oracle, then open CMD
as admin, go to the extracted folder and execute:
install odp.net4 c:\oracle\client11g_x64 client11g_x64 true
install odp.net2 c:\oracle\client11g_x64 client11g_x64 true
install oramts c:\oracle\client11g_x64 client11g_x64 true
in most of the cases we don't need asp.net package.
After installing your oracle client, create your tnsnames.ora
in C:\oracle\client11g_x64\network\admin
If you need the 32bit client, use the same commands above replacing 64
by 32
.
This should make sure that your app will work with this version even if it is strongly coupled with an older version of DataAccess.
Open both files:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
And add:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="0.000.0.0-4.112.4.0" newVersion="4.112.4.0"/>
</dependentAssembly>
<qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess,version=4.112.4.0,publicKeyToken=89b483f429c47342,culture=neutral" />
</assemblyBinding>
</runtime>
Open these files:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
And add:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="0.000.0.0-2.112.4.0" newVersion="2.112.4.0"/>
</dependentAssembly>
<qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess,version=2.112.4.0,publicKeyToken=89b483f429c47342,culture=neutral" />
</assemblyBinding>
</runtime>