How to fix an error of OLE DB provider SQLNCL11 has not been registered in ms sql Linked Server

I am getting this email from my client as follows:

We seem to have an issue with the with the drill down app. It appears that we are not getting any results for our company inventory and from the XYZ database in the drill down, we believe the last time this specific function was working correctly was Jan 30 2019.

I have attached some screenshots which Susan has sent to me that should be of some help to you. In addition, I have checked a couple of known part numbers in the supplier website drill down and also checked stock directly in the XYZ function and no results were returned.

We think the other functions are still working fine.
Can you investigate please?

As the result of the above email, I logged into client’s server and run one particular MS SQL Stored Procedure. Its purpose was to add records from 2 different databases whenever and inventory part numbers were requested. In this scenario, the client gets the Inventory from the local database and from another remote database which is from a different company. The two companies share the same inventory. To explain the reason it is working this way, it is beyond the scope of this article.

This is the error I got when I run the Stored Procedure:
Msg 7403, Level 16, State 1, Procedure GetInventoryBasedOnPN, Line 34 [Batch Start Line 17] The OLE DB provider "SQLNCLI11" has not been registered.

What I suspected happened is that there were 3 versions of Ms SQL installed on that server and 2 of them were un-installed lately. It seems the sql native client driver was removed as well.

To fix the above error you need to install the Microsoft SQL Server Native Client 11.0:

This is where you can download the sql native Client driver:
https://www.microsoft.com/en-us/download/details.aspx?id=50402

The current server runs ms sql 2016 but there is no SQL Server 2016 Native Client. The one I installed is part of ms sql server 2012 feature pack.  

This is an additional info about that sql client driver:
https://docs.microsoft.com/en-us/sql/relational-databases/native-client/applications/installing-sql-server-native-client?view=sql-server-2017

Otherwise running a regular request on the local database was working just fine. The SQL client driver is needed especially when a Linked Server is involved.

We also created an SQL Job to insert data from the same external company’s database into a table called: Inv_New in the local database. That sql job also got also the same error. To request data from a remote server we had to create a Linked Server which we entered the IP Address of that external company.

Linked Servers allows you to connect to other database instances on the same server or on another machine or remote servers.

See example code which runs via an SQL Job every 6 min 5 days a week and takes advantage of the Linked Server. The IP address is a fake one for the purpose of this article.

After the MS SQL native client driver was installed all operations resumes without any glitch or any issues. The client was happy and that was quick fix within the same day.

We provide remote DBA services and we believe that any application development starts from the ground up such as: Database design and proper database optimization is a must for best performance and the productivity gain is tremendous. We also can take your MS Access database and up-size it to a fully designed database that takes advantage of the great features exist in ms sql.

Comments