How to install Oracle OLE drivers for use in SQL Server 2008 R2 x64
After hours of research, I managed to cobble together some working instructions for Oracle 11g R2. As it turns out, you will likely need both the 32 and 64 bit clients installed to have things working in BIDS/Visual Studio/SSMS. I may have installed more Oracle components than I needed, but here's what worked for me:
- Download 32 and 64-bit clients from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html (click "see all" to see different versions, otherwise, you'll be downloading the complete Oracle program. Your downloads should be about 600 meg each)
- Run 32-Bit install on the SQL Server. Select "Custom"
- For Oracle Base, enter "C:\Oracle"
- For "Software Location", change to C:\Oracle\product\11.2.0\client_32
- Choose the following components:
- SQL*Plus
- Oracle Call Interface (OCI)
- Oracle Net
- Oracle Services for Microsoft Transaction Server
- Oracle Administration Assistant for Windows
- Oracle Provider for OLE DB
- Oracle Data Provider for .NET
- Oracle Providers for ASP.NET
- Repeat above steps with the 64-bit installer. HOWEVER, change the "Software Location" to C:\Oracle\product\11.2.0\client_64
- I got a memory error at this point, but chose to ignore it since I know there is enough
- Ignore the error "OracleMTSRecoveryService already exists"
Now that the install is done, just need to tweak a few things.
- Make registry changes to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI
-
OracleOciLib
should beoci.dll
-
OracleSqlLib
should beorasql11.dll
-
OracleXaLib
should beoraclient11.dll
-
- Make same registry changes to
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSDTC\MTxOCI
- Create or copy a new
tnsnames.ora
in C:\Oracle\product\11.2.0\client_32\network\admin - Create or copy a new
tnsnames.ora
in C:\Oracle\product\11.2.0\client_64\network\admin - Reboot!
- You should now see
OraOLEDB.Oracle
as a provider under Linked Servers\Providers in SSMS - Right-click this provider, then Properties, then tick the box for "Allow Inprocess"
- You can now create linked server through the GUI or T-SQL
Good luck!
Related videos on Youtube
SomeGuy
Updated on September 17, 2022Comments
-
SomeGuy over 1 year
As per standard procedure we've been using for years for previous versions of both Oracle and SQL Server, I have installed Oracle's latest ODAC package, which includes the Oracle OLE driver onto our new SQL Server 2008 R2 x64 nodes. I have done the recommended system reboot, but OraOLEDB.Oracle does not show in the Linked Servers\Providers node in SSMS. The only difference between this installation and previous SQL Server installations is that I am now using SQL Server x64 (on Windows 2008 R2). Should this make any difference?
Note that I am able to connect to Oracle servers using SQL*Plus from the SQL Server nodes directly. The only thing I am missing is that Provider. Anyone know what I am missing? There are many posts around the web, but there seems to be a lot of confusion and outdated links to Oracle's download page.
The ONLY thing I need to be able to do is create a linked server to Oracle, and run select queries against it. I don't need to do anything through Visual Studio.
-
SomeGuy over 13 yearsI can't seem to find x64 components for 11g on the Oracle site without downloading the entire x64 client which is 2GB. The ODAC only seems to go up to 10g. Is anyone else noticing this? I'll try the full client for now, but I've never had to do that before. Maybe they will be releasing ODAC 11g for x64 in the future.
-
Massimo over 13 yearsThe client is ~615 MB, the 2GB package is the full product; see here: oracle.com/technetwork/database/enterprise-edition/downloads/….
-
santiiiii over 13 yearsI had the same problem (Sql Server 2008 R2 64x connecting to an Oracle 8), and solved it following your instructions. Fortunately, I just had to install the 64 bit client. Thanks!
-
Gabriel Guimarães almost 13 yearsI installed it without the SQL*Plus and Administration Assistant, and without the registry changes on a x64 machine and it worked.
-
Gabriel Guimarães almost 13 years@SomeGuy actually there's ODAC for 11g, you couldn't find it because oracle website is a mess.
-
Willie Cheng about 7 yearsHi @SomeGuy can i use your instruction with 12c too thanks
-
Mike over 4 yearsHeads up on the download size - 3.1GB for the latest Oracle Client for Windows x64 version 19C.