SQL Server error 53: "A network-related or instance-specific error occurred"
SQL Server error 53 is the Windows error "The network path was not found". Your client could not locate or reach the server, so it never got as far as logging in. Start by checking the server and instance name, then that the instance is running, TCP/IP is enabled and the firewall lets the port through.
On this page
What it means
Error 53 is a Windows system error, "The network path was not found". SQL Server does not have its own page for it. You see it inside the general connection failure message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible", followed by "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (Microsoft SQL Server, Error: 53)".
Windows could not find the machine or the path. Either the name did not resolve, the host could not be reached, or the traffic was blocked. This is a connection problem, not a password problem. If you can reach the server and only the login is rejected, see error 18456.
Symptoms and causes
You are likely dealing with this problem if:
- SSMS, sqlcmd or an application cannot connect to a remote SQL Server instance and shows the network-related or instance-specific error.
- The message mentions Named Pipes Provider, error 40 and (Microsoft SQL Server, Error: 53).
- Sometimes a login timeout appears first.
The usual causes, most common first:
- Wrong server or instance name
- A typo, a wrong fully qualified domain name, or a stale client alias points the client at something that does not exist.
- The name does not resolve
- DNS or NetBIOS cannot translate the name to an address, or the cache holds an old entry. If you also see "TCP Provider, error: 0 - No such host is known (Error: 11001)", name resolution is the likely culprit.
- Host unreachable
- The server is down, on a different network, or a firewall blocks the path to it.
- Instance or service stopped
- The SQL Server service is not running, so nothing answers.
- TCP/IP disabled on the server
- If a local shared memory connection works but a TCP connection does not, TCP/IP is probably disabled.
- SQL Server Browser problems (named instances)
- The Browser service is not running, UDP 1434 is blocked, or the instance is hidden, so the client cannot find the instance's port.
- Firewall blocking the instance port
- TCP 1433 is the default. A default instance on a non-standard port also fails if the port is missing from the connection string.
- Client protocol order
- The client's protocol order settings do not put TCP/IP ahead of Named Pipes.
How to fix it
Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.
1.Check the server name against the real one
A wrong name is the most common cause and takes a minute to rule out.
- On the server, open SQL Server Configuration Manager and select SQL Server Services.
- Read the instance entry.
SQL SERVER (MSSQLSERVER)is a default instance, so connect with<computer>.SQL SERVER (name)is a named instance, so connect with<computer>\<name>. - Compare that with exactly what you type in the connection dialog or connection string.
2.Look for a bad client alias
An old alias can silently redirect your connection to the wrong place.
- On the client, open SQL Server Configuration Manager and go to SQL Native Client Configuration > Aliases. You can also run
cliconfg.exe. - Rename or remove any alias that points to the wrong server. A named pipe alias must use the format
\\MySQL\pipe\MSSQL$Named\sql\query.
3.Make sure the instance (and Browser) is running
A stopped service cannot answer any connection.
- Start the instance from SQL Server Configuration Manager, or list running SQL services in PowerShell on the server:
Get-Service | Where {$_.status -eq 'running' -and $_.DisplayName -like "sql server*"} - For a named instance, confirm that the SQL Server Browser service is running too.
4.Test the network path from the client
This separates a name resolution problem from a blocked or dead host.
- Ping the server by IP address, then by name.
ping <IP> ping <name> - If the IP works but the name fails, clear the DNS cache and try again.
Test-NetConnectioncan be used as an alternative check.ipconfig /flushdns - If the IP works and the name still does not, connect by IP address until the DNS entry is fixed.
5.Test locally on the server and force TCP
If a local shared memory connection works but TCP does not, TCP/IP is probably disabled.
- On the server, connect with SSMS or
sqlcmdusing the plain computer name. - Connect again, forcing TCP with the
tcp:prefix.tcp:<computer>
6.Enable TCP/IP on the server
Do this if the previous test showed that TCP connections fail while the local shared memory connection works.
Before you start: Restarting the Database Engine drops all active connections. Do it outside working hours on a production server.
- Open SQL Server Configuration Manager, then SQL Server Network Configuration > Protocols for <instance>.
- Right-click TCP/IP and choose Enable.
- Restart the Database Engine service.
7.Find the port and connect by IP and port
Connecting with an explicit address and port skips name resolution and the Browser service. If this works, the fault is DNS, Browser or UDP 1434.
- In SSMS, open the SQL Server error log and filter for "server is listening on". The line looks like
Server is listening on [ 'any' <ipv4> 1433]. See SQL Server error logs if you need help finding them. - Connect using the address and port, or the instance name and port.
192.168.1.101,1433 server\instance,port - Note that SQL Browser cannot report the port of a default instance that listens on a non-standard port, so include the port in the connection string for that case.
8.Allow the SQL Server port through the firewall
A blocked port looks exactly like an unreachable server.
Before you start: Do not switch the firewall off. Add narrow rules for only the ports you need, and follow your organisation's change process on shared servers.
- Allow inbound TCP on the instance's port (1433 by default).
- For named instances that rely on Browser, also allow UDP 1434.
- Optionally give the named instance a fixed TCP port (Microsoft's "Configure a Server to Listen on a Specific TCP Port" procedure), allow that port, and put it in the connection string.
- Be aware that Windows 7/2008 and later may drop UDP 1434 replies that come from a different server IP.
9.Put TCP/IP ahead of Named Pipes on the client
Microsoft's guidance is to give TCP/IP a lower order number than Named Pipes in the client protocol settings.
- On the client, open SQL Server Configuration Manager and go to SQL Native Client Configuration > Client Protocols.
- Enable TCP/IP and give it a lower order number than Named Pipes. Leave Shared Memory first and TCP/IP second.
Check that it worked
- SSMS or sqlcmd connects to the instance without the error 40 / error 53 message.
- Connecting by name and by IP and port both work.
If it still fails
- Check which sub-error you actually have. Error 26, 10060 (timeout) and 10061 (connection refused) are related but have different causes, and Microsoft's article covers them separately.
- Read the SQL Server error log on the server to confirm which address and port it is listening on.
- Ask your network administrator whether a firewall, VPN or routing rule sits between the client and the server.
- For Azure SQL, Linux or container deployments, check the vendor's own connectivity documentation, as this article covers SQL Server on Windows.
Questions
What is the difference between error 40 and error 53?
They appear together in the same message. Error 40 says the connection could not be opened, and 53 is the underlying Windows reason: the network path was not found.
Is error 53 a login or password problem?
No. The client never reached the login stage. For rejected logins, see error 18456.
Sources
- Fix Network-Related or Instance-Specific Errors in SQL ServerOfficial · Microsoft Learn