Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
masterdatabase 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:
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.
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.
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:
- Create a new .udl test file.
- Double-click the .udl file to open the Data Link Properties dialog.
- Select the Provider tab, and choose the OLE DB provider from the list.
- On the Connection tab, enter the server name and authentication details.
- Select Test Connection to verify connectivity.
For detailed steps, see Test OLE DB connectivity to SQL Server by using a UDL file.
Related content
- Create linked servers (SQL Server Database Engine)
- OLE DB Driver for SQL Server
- sp_addlinkedsrvlogin (Transact-SQL)
Third-party information disclaimer
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.