OLEDB Connection to Azure SQL fails: Named Pipes Provider: Could not open a connection to SQL Server

493 Views Asked by At

We have an application that connects to an Azure SQL database with a connection string like

Server={ServerNameHere}.database.windows.net;Database={DatabaseNameHere};etc.....

Our application normally connects using TCP/IP, and the same connection string works perfectly fine from several other machines. Just not for this one client PC.

The error it returns is

A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessable. Check [etc]

followed by:

Named Pipes Provider: Could not open a connection to SQL Server [53].

This is the bit I don't understand. Our connections are made over TCP/IP so why is it showing a message that mentions Named Pipes Provider?

The fact that the connection to the same database, with the same credentials, works fine from other client PCs leads me to think that the problem is not at the Server end (Azure).

But if it's at the client end. What do I need to look for on the Client PC?

1

There are 1 best solutions below

2
Bhavani On

I am having asp.net app and I try to connect my Azure SQL database to my app by using my connection string.

Connection String:

Server=tcp:<server>.database.windows.net,1433;Initial Catalog=<db>;Persist Security Info=False;User ID=<username>;Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

I try to connect to database but I got below error:

enter image description here

In my case at that time, I connected to my office Lan network I removed that, and I connected to my personal hotspot and tried again it connected successfully.

enter image description here

The error regarding Named Pipes Provider enable Named Pipes in SQL server configuration manager.

SQL server configuration manager-->SQL Native Client-->Client Protocols-->Named Pipes

enter image description here

It may reduce the error.