0

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?

DinahMoeHumm
  • 185
  • 10
  • 1
    Have a look at the [help] article [How do I format my posts using Markdown or HTML?](https://stackoverflow.com/help/formatting), which explains how markdown for formatting works. – Thom A Feb 09 '23 at 16:05
  • If this is the issue with connecting to a database using SQL Server Management Studio from your local machine or VM, then make sure that SQL Server services are running or not on your local machine or VM. to check, search Run option from the Windows search bar, then type services.msc, then press Enter and locate the SQL Server-related services and verify that they are in running state or not. – vithal wadje Feb 09 '23 at 17:28
  • Hello Vithal, no, this is a connection made from our Application (written for the .NET Framework) to an Azure SQL database using OLEDB. The same application works fine against the same database for all other PCs. – DinahMoeHumm Feb 10 '23 at 09:30

1 Answers1

0

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.

Bhavani
  • 1,725
  • 1
  • 3
  • 6
  • No, this is an AZURE SQL Server. I don't even have access to "Sql Server Configuration Manager". And we do not want to support Named Pipes connections either. You're saying you were connected to your company LAN and it started working when you connected to your personal hotspot. Firstly, a hotspot is not reliable enough for us, but more importantly, we cannot tell our clients to use hotspots. Instead we should tell their IT departments what they need to do to get over this issue. – DinahMoeHumm Feb 14 '23 at 12:25
  • Can you check [this](https://stackoverflow.com/questions/16633371/azure-and-sql-server-named-pipes-provider-error-40-could-not-open-a-connect) once? – Bhavani Feb 15 '23 at 04:51