How to Install Oracle OLE DB Provider for SQL Server 2008 R2 x64 Linked Servers


2 views

After installing Oracle's latest ODAC package on SQL Server 2008 R2 x64 (Windows Server 2008 R2), the OraOLEDB.Oracle provider doesn't appear in SQL Server Management Studio's Linked Servers > Providers node, despite following standard installation procedures that worked on 32-bit systems.

For SQL Server 2008 R2 x64 to properly recognize Oracle OLE DB providers, you need:

  1. Oracle Data Access Components (ODAC) x64-bit version (11g or 12c)
  2. Oracle Client libraries matching your Oracle server version
  3. Proper system PATH configuration

Here's the complete installation process I've verified working:

1. Download the appropriate ODAC package from Oracle (currently 12c):
   - Oracle Data Access Components (ODAC) 12c Release 4 (12.1.0.2.4) for Windows x64

2. Run the installer as Administrator:
   - Select "Oracle Provider for OLE DB" component
   - Choose "Install for All Users" option
   - Set ORACLE_HOME to a path without spaces (e.g., C:\oracle\product\12.1.0\client_64)

3. Update system PATH:
   - Add %ORACLE_HOME%\bin
   - Place it before any 32-bit Oracle paths

4. Reboot the server (mandatory for x64 systems)

5. Register the provider in SQL Server:

If the provider still doesn't appear, register it manually:

USE [master]
GO
EXEC master.dbo.sp_addlinkedserver 
    @server = N'ORACLE_LINK',
    @srvproduct=N'Oracle',
    @provider=N'OraOLEDB.Oracle',
    @datasrc=N'ORACLE_SID'
GO

-- Configure security context
EXEC master.dbo.sp_addlinkedsrvlogin 
    @rmtsrvname = N'ORACLE_LINK',
    @useself = N'False',
    @locallogin = NULL,
    @rmtuser = N'oracle_user',
    @rmtpassword = N'oracle_password'
GO

Common issues and solutions:

  • Error 7302: Usually indicates 32-bit vs 64-bit mismatch. Verify both SQL Server and Oracle client are x64.
  • Registry keys: Check HKEY_LOCAL_MACHINE\SOFTWARE\Oracle for proper ORACLE_HOME settings.
  • Permissions: The SQL Server service account needs read access to Oracle home directory.

After successful setup, test with:

-- Simple test query
SELECT *
FROM OPENQUERY(ORACLE_LINK, 'SELECT * FROM oracle_table WHERE ROWNUM < 10')

When setting up a linked server from SQL Server 2008 R2 x64 to Oracle, the Oracle OLE DB provider (OraOLEDB.Oracle) doesn't appear in SQL Server Management Studio's Providers list, even after installing the latest ODAC package. This occurs specifically on 64-bit environments, while the same setup worked fine on 32-bit SQL Server installations.

Before troubleshooting, confirm these requirements are met:

  • Oracle Data Access Components (ODAC) x64 installed
  • Oracle client connectivity verified via SQL*Plus
  • System reboot performed after installation
  • Windows Server 2008 R2 x64 as host OS

The key difference in x64 environments is that you need both the 64-bit ODAC and proper registry entries:

1. Download Oracle Data Access Components (ODAC) x64 from Oracle's site
2. Run installation with elevated privileges
3. Select "Oracle Provider for OLE DB" component
4. Complete installation and reboot
5. Verify registry entries exist at:
   HKLM\SOFTWARE\Classes\OraOLEDB.Oracle

If the provider still doesn't appear, try manual registration:

regsvr32 "C:\oracle\product\11.2.0\client_1\bin\OraOLEDB11.dll"

Once the provider is available, create the linked server:

EXEC master.dbo.sp_addlinkedserver 
@server = N'ORACLE_LINKED_SERVER', 
@srvproduct=N'Oracle', 
@provider=N'OraOLEDB.Oracle', 
@datasrc=N'ORACLE_SID';

EXEC master.dbo.sp_addlinkedsrvlogin 
@rmtsrvname=N'ORACLE_LINKED_SERVER',
@useself=N'False',
@locallogin=NULL,
@rmtuser=N'oracle_user',
@rmtpassword='oracle_password';
  • Provider not visible: Check if the Oracle OLE DB driver appears in 32-bit ODBC Administrator (comes with Windows). If it does, you've installed the wrong bitness.
  • Permission issues: Ensure SQL Server service account has read access to Oracle home directory
  • Version conflicts: Uninstall all previous Oracle clients before installing ODAC

For more complex environments, consider using TNSNames:

@datasrc=N'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle_host)(PORT=1521))
(CONNECT_DATA=(SID=ORACLE_SID)))'

When querying Oracle through linked server:

  • Use OPENQUERY for better performance with large datasets
  • Add COLLATION_COMPATIBLE=TRUE to the provider string if encountering collation conflicts
  • Consider setting distributed transaction participation to false for simple queries