- Error number
- 53
- Severity
- 20 (fatal: the connection ends; may indicate a serious problem)
- State
- 0
- Product
- SQL Server client network libraries (SqlClient, ODBC Driver for SQL Server)
- Versions
- Any SQL Server version; raised by the client network library (SqlClient, ODBC, SSMS), not by the Database Engine
- Category
- Connectivity
- Last reviewed
- 23 October 2026
On this page
What it means
Error 53 means the client could not open a network path to the server name you gave it, so no SQL Server was ever contacted; it is reported when the last protocol the client tried was named pipes.
53 is a Windows error number ("the network path was not found"), passed up by the client library. Nothing reached SQL Server, so there is no entry in the SQL Server error log and no login was attempted. The provider text tells you which protocol failed last: Named Pipes Provider, error: 40. Clients without a protocol prefix try TCP first and then named pipes, so a name that does not resolve, or a server that answers on neither, ends with the named pipes error and number 53.
Severity 20 here is the class the client library gives the exception; it does not mean the server is damaged. Read the message as "check the name and the path first": the server or instance name, DNS, whether the SQL Server service runs, which protocols it listens on, and firewalls. In our tests the same host name produced 53 over named pipes and No such host is known (11001) when TCP was forced, so the number depends on the protocol as much as on the cause.
Common causes
- The server name is misspelled, points at the wrong machine, or does not resolve in DNS from the client.
- The SQL Server service on the target machine is stopped.
- The instance does not listen on TCP/IP (disabled by default in Developer and Express editions) and named pipes is disabled or blocked, so neither protocol can connect from another machine.
- A firewall blocks the SQL Server port, or file and printer sharing (SMB, used by named pipes) between client and server.
- A client alias or an old connection string sends the client to a name that no longer exists.
Diagnose it
Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.
See which endpoints SQL Server listens on
Run on the server (for example through a local connection) as a member of securityadmin or sysadmin.
EXEC sp_readerrorlog 0, 1, N'Server is listening on'; A line such as Server is listening on [ 'any' <ipv4> 1433] means TCP/IP is on. If the only lines are on 127.0.0.1 or ::1 port 1434, that is the dedicated admin connection: TCP/IP for clients is disabled. We saw exactly that on our lab instance, where every TCP attempt from a client failed.
Read the protocol settings from the server registry
SELECT registry_key, value_name, value_data
FROM sys.dm_server_registry
WHERE (value_name = N'Enabled'
AND (registry_key LIKE N'%SuperSocketNetLib\Tcp'
OR registry_key LIKE N'%SuperSocketNetLib\Np'
OR registry_key LIKE N'%SuperSocketNetLib\Sm'))
OR registry_key LIKE N'%SuperSocketNetLib\Tcp\IPAll'; Enabled = 0 on the Tcp key means TCP/IP is off; on Np, named pipes is off. IPAll shows the static TcpPort or the TcpDynamicPorts value that clients must reach.
Check that the SQL Server services are running
SELECT servicename, status_desc, startup_type_desc, last_startup_time
FROM sys.dm_server_services; The Database Engine service shows Running if you can run this at all. Use it on a multi-instance host, from a working instance, to confirm the service name and startup type.
Test the name and the port from the client
Run in PowerShell on the client machine, not in SQL Server.
Resolve-DnsName sqlprod01
Test-NetConnection sqlprod01 -Port 1433 A DNS failure points to the name. TcpTestSucceeded : False with a resolved address points to the service, the TCP/IP setting or a firewall.
How to fix it
Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.
Correct the server and instance name
Client or network sideUse the exact name from the server: computer for a default instance, computer\instance for a named instance, or computer,port. Check client aliases and old connection strings. Force TCP with the tcp: prefix while testing so the error reflects the protocol you actually use.
-- sqlcmd -S tcp:sqlprod01,1433 -E -C
-- Server=tcp:sqlprod01,1433;Database=Sales;Integrated Security=true;
Start the SQL Server service
Changes configurationOn the server, start the instance service (MSSQLSERVER for a default instance, MSSQL$NAME for a named instance) and set it to start automatically.
# PowerShell, elevated, on the server
Start-Service -Name MSSQLSERVER
Set-Service -Name MSSQLSERVER -StartupType Automatic
Enable the TCP/IP protocol for remote clients
Changes configurationClients on another machine normally connect over TCP/IP, which Developer and Express editions leave disabled. In SQL Server Configuration Manager, open SQL Server Network Configuration, Protocols for your instance, enable TCP/IP and restart the service. Note that the server option remote access is unrelated: it controls remote stored procedure calls between servers, is deprecated, and does not affect client connections.
Caution: The protocol change takes effect only after the SQL Server service restarts, which disconnects every session. Plan the restart.
Allow the SQL Server port through the firewall
Changes configurationAllow inbound TCP on the port the instance listens on (1433 for a default instance unless changed). For named instances that use dynamic ports, also allow UDP 1434 for the SQL Server Browser service, or give the instance a static port.
# PowerShell, elevated, on the server
New-NetFirewallRule -DisplayName 'SQL Server TCP 1433' -Direction Inbound -Protocol TCP -LocalPort 1433 -Action Allow
Examples
Named pipes to a server name that does not exist (sqlcmd)
Reproduced on the lab machine with a made-up host name. ODBC Driver 18 prints the Windows error number in brackets: [53].
-- From a command prompt:
-- sqlcmd -S np:sqlprod01 -E -C -l 15
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server [53]. . Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to np:sqlprod01. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
An application connecting to the wrong name (.NET SqlClient)
Reproduced with System.Data.SqlClient from PowerShell. Without a protocol prefix the client tried TCP, then named pipes, and reported the named pipes failure after the 30-second connect timeout: SqlException Number 53, Class 20, State 0.
-- PowerShell:
-- $c = New-Object System.Data.SqlClient.SqlConnection 'Server=sqlprod01;Integrated Security=true;Connect Timeout=30'
-- $c.Open()
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
The same name forced over TCP gives a different number
Reproduced with sqlcmd and ODBC Driver 18. With tcp: the name lookup fails first, so the client reports No such host is known (Windows error 11001) instead of 53. Both point to the server name.
-- From a command prompt:
-- sqlcmd -S tcp:sqlprod01 -E -C -l 5
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : TCP Provider: No such host is known. . Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Login timeout expired. Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to tcp:sqlprod01. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
How to prevent it
Keep one documented record per server: host name, instance name, port and enabled protocols. Write connection strings with an explicit protocol and port (tcp:host,1433) so a failure always names the real cause, and keep them in configuration rather than code.
Make TCP/IP, the firewall rule and the service startup type part of your server build script, so a rebuilt or patched server comes back reachable. A simple scheduled Test-NetConnection from an application server catches a closed port before users do.
Common questions
Why does error 53 mention Named Pipes when my application uses TCP?
Clients without a protocol prefix try TCP first and named pipes last, and report the last failure. Add tcp: and the port to the server name; the message will then describe the TCP failure, such as an unknown host (11001) or a refused port (10061).
What is the difference between error 53 and error 10061?
Error 53 means the client could not open a path to the named server at all. Error 10061 means the client reached the machine over TCP but nothing accepted the connection on that port.
Does the remote access server option fix error 53?
No. The remote access option controls remote stored procedure calls between servers and does not affect client connections. Remote clients need TCP/IP enabled on the instance and an open firewall port.
Learn more on CodeWithSQL
Official documentation
- Fix network-related or instance-specific errors in SQL Server (Microsoft Learn)
- Enable or disable a server network protocol (Microsoft Learn)
- Configure the Windows Firewall to allow SQL Server access
- sys.dm_server_registry (Transact-SQL)
Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.