Installing Oracle OLE DB 32-bit and 64-bit drivers side-by-side

Last year I was working on a Data Warehouse project where we were going to use SSIS (SQL Server Integration Services) to read data from an Oracle Database. The problem was that the SSIS development environment uses 32-bit OLE DB drivers, but the SSIS runtime uses 64-bit drivers (this could be changed to 32-bit, but it was not a good solution). So we needed to have Oracle OLE DB 32-bit and 64-bit drivers side-by-side. This was trickier than expected. Here is how we solved it!

Installing Oracle OLE DB drivers on Windows

Oracle provides ODAC Runtime Downloads, which contains drivers for Windows. These are available as:

  • ODAC XCopy
  • 64-bit ODAC OUI

The ODAC OUI gives you a graphical user interface for installation, but it only provides you with 64-bit version of the drivers. If you need 32-bit drivers, you will have to use the command-line ODAC XCopy.

Using ODAC XCopy you can install 64-bit or 32-bit OLE DB drivers for Oracle. You can also use ODAC XCopy to install the Oracle Instant Client which supports ODBC.

However, installing any of the drivers (32-bit or 64-bit) disables the other driver. How can you make them co-exist?

Side-by-side installation

The trick is to use Windows symbolic links. The Windows system folder will be in different locations depending on 64-bit or 32-bit mode. Using symbolic links, you can therefore create a path that points differently for 64-bit applications and 32-bit applications.

  • C:\Windows\System32 for 64-bit applications
  • C:\Windows\SysWOW64 for 32-bit applications

I found this solution through this Stack Overflow thread: https://stackoverflow.com/questions/25216290/installing-oracle-32-bit-client-on-windows-server-already-running-64-bit-oracle

Here are the full steps:

  1. Download ODAC XCopy 64-bit and 32-bit from Oracle's website
  2. Unzip the files and open a command prompt as administrator. Go to the location of the unzipped files. Oracle ODAC installation
  3. Run install.bat for the 64-bit driver:
1install.bat oledb C:\Oracle\64bit odac

Go to the location of the unzipped files for the 32-bit driver and install from there:

1install.bat oledb C:\Oracle\32bit odac
  1. Now create symbolic links to your driver folders:
1cd C:\Windows\System32
2mklink /d odac C:\Oracle\64bit
3cd C:\Windows\SysWOW64
4mklink /d odac C:\Oracle\32bit
  1. Edit your environment variables and add C:\Windows\System32\odac and C:\Windows\System32\odac\bin to your path: Oracle Odac Path Now the OLE DB driver will automatically be loaded from C:\Oracle\64bit or C:\Oracle\32bit depending on if in 64- or 32-bit architecture of your application.

Done!