大网数据广告活动
数据库与应用安全

Fix OLE DB provider errors for SQL linked servers

· 52CE 我爱测

Resolve OLE DB provider errors 7403 and 7302 for linked servers in SQL Server. Learn how to fix provider registration, bitness mismatches, and connectivity issues.

Original KB number:   2555855

Summary

This article helps you resolve OLE DB provider errors that occur when you run T-SQL queries through linked servers or ad-hoc queries by using OPENROWSET or OPENDATASOURCE in Microsoft SQL Server. These errors typically indicate that the OLE DB provider isn't installed, isn't registered, or doesn't match the SQL Server architecture.

Symptoms

When you run T-SQL queries that use linked servers or ad-hoc queries (by using OPENROWSET or OPENDATASOURCE), you might receive one of the following error messages:

The OLE DB provider "<ProviderName>" has not been registered. (Microsoft SQL Server, Error: 7403)

Cannot create an instance of OLE DB provider "<ProviderName>" for linked server "<LinkedServerName>". (Microsoft SQL Server, Error: 7302)

These errors can also occur after you:

  • Migrate SQL Server from one computer to another.
  • Restore the master database from a different server.

Cause

SQL Server can't initialize the specified OLE DB provider for one of the following reasons:

  • The OLE DB provider or driver isn't installed on the server.
  • The installed provider doesn't match the SQL Server bitness (x86 versus x64).
  • The OLE DB provider is installed but not properly registered.

Note: When you create a linked server by using sp_addlinkedserver, SQL Server doesn't immediately report errors that are related to provider availability. These errors appear only when you run a query that uses the linked server.

Solution

To resolve the issue, follow the steps in each section in the given order.

Verify the installed OLE DB providers or drivers

Check which OLE DB providers or drivers are registered on your SQL Server instance by using one of the following methods:

  • In SQL Server Management Studio (SSMS), expand Server Objects > Linked Servers > Providers to see the list of registered OLE DB providers or drivers.

  • Run the following query to see all defined linked servers and their associated providers or drivers:

    SELECT * FROM sys.servers;
    

    For more information about the columns that are returned, see sys.servers (Transact-SQL).

Verify the provider or driver installation

Verify that the correct OLE DB provider is installed and matches SQL Server's architecture:

  1. Check whether the provider that's required by your linked server is present in the provider list from Verify the installed OLE DB providers or drivers.

  2. If the provider is missing, install it:

    • For Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL): Download the latest version from the Microsoft OLE DB Driver download page.
    • For third-party providers or drivers: Contact the vendor to get the correct installer.
  3. Make sure that the provider version matches the SQL Server architecture. For example, install the 64-bit provider for a 64-bit SQL Server instance.

For more methods to verify the provider, see OLE DB driver installation check.

Register the OLE DB provider

If the provider DLL exists on disk but isn't registered, reinstall the provider or driver by using the steps in Verify the provider or driver installation. Reinstalling ensures that the DLL is properly registered.

Verify the provider connectivity

Use a Universal Data Link (UDL) file to verify that the OLE DB provider can connect to the target data source:

  1. Create a new .udl test file.
  2. Double-click the .udl file to open the Data Link Properties dialog.
  3. Select the Provider tab, and choose the OLE DB provider from the list.
  4. On the Connection tab, enter the server name and authentication details.
  5. Select Test Connection to verify connectivity.

For detailed steps, see Test OLE DB connectivity to SQL Server by using a UDL file.

Related content

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/14/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。