On this page
Why it happens
Error 53 is raised on the client, not by SQL Server. It means your application, sqlcmd, or SSMS tried to open a connection and the network layer could not find a SQL Server listening at the address you gave it. Because nothing answered, there is no server-side message and no failed login: the request never reached the engine. See the connection and security guide for how the pieces fit together.
The wording is generic on purpose. The provider text Named Pipes Provider, error: 40 - Could not open a connection to SQL Server and the Windows system code Error: 53 (network path not found) simply say the client could not reach the target. The real cause is almost always one of a short list: a wrong server or instance name, the SQL Server service is stopped, the TCP/IP protocol is disabled, a firewall is blocking the port, the SQL Server Browser service is not running for a named instance, or the port is wrong.
Because SQL Server is not reachable yet, there are no T-SQL statements that reproduce error 53. You reproduce and diagnose it with connection attempts, for example sqlcmd -S ServerName, and by checking services, protocols, and firewall rules on the machine that hosts SQL Server.
Examples
Connecting to a name that does not resolve to a running instance
-- Run from a command prompt on the client machine
sqlcmd -S SQLPROD01 -E
-- The client cannot find a SQL Server listening at SQLPROD01
Sqlcmd: Error: Microsoft ODBC Driver for SQL Server : 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) (Microsoft SQL Server, Error: 53).
Connecting to a named instance while SQL Server Browser is stopped
-- Named instance, resolved through SQL Server Browser (UDP 1434)
sqlcmd -S SQLPROD01\SALES -E
-- With the Browser service stopped the instance name cannot be resolved
Sqlcmd: Error: Microsoft ODBC Driver for SQL Server : 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) (Microsoft SQL Server, Error: 53).
Testing whether the port is reachable through the firewall
-- Force TCP and an explicit port to isolate a firewall block
sqlcmd -S tcp:SQLPROD01,1433 -E
-- If a firewall drops TCP 1433 the client still cannot connect
Sqlcmd: Error: Microsoft ODBC Driver for SQL Server : 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) (Microsoft SQL Server, Error: 53).
How to fix it
Verify the exact server and instance name and that SQL Server is running
Most error 53 cases are a typo or a stopped service. Confirm the machine name and instance, then check that the SQL Server service is actually running in services.msc (or with PowerShell) before looking anywhere else.
-- List SQL Server services and their status on the host
Get-Service | Where-Object { $_.Name -like 'MSSQL*' }
-- Then test the exact name you use in the connection string
sqlcmd -S SQLPROD01\SALES -E
Enable the TCP/IP protocol and restart the service
Open SQL Server Configuration Manager, expand SQL Server Network Configuration, select Protocols for your instance, and set TCP/IP to Enabled. Restart the SQL Server service so the change takes effect.
-- After enabling TCP/IP in Configuration Manager, restart the instance
-- Default instance:
Restart-Service -Name MSSQLSERVER
-- Named instance (example SALES):
Restart-Service -Name 'MSSQL$SALES'
Open the SQL Server port in Windows Firewall
If TCP/IP is on but the connection still fails, the firewall on the SQL Server host is likely dropping the port. Allow inbound TCP on the port the instance listens on (default 1433 for a default instance).
-- Allow inbound TCP 1433 for the database engine
New-NetFirewallRule -DisplayName 'SQL Server 1433' -Direction Inbound -Protocol TCP -LocalPort 1433 -Action Allow
Start SQL Server Browser and allow UDP 1434 for named instances
Named instances use dynamic ports that clients discover through the SQL Server Browser service over UDP 1434. Start the Browser service and open that UDP port so the instance name can be resolved.
-- Start and enable the SQL Server Browser service
Set-Service -Name SQLBrowser -StartupType Automatic
Start-Service -Name SQLBrowser
-- Allow the Browser discovery port
New-NetFirewallRule -DisplayName 'SQL Browser 1434' -Direction Inbound -Protocol UDP -LocalPort 1434 -Action Allow
Enable remote connections on the instance
If the client is on another machine, confirm the instance accepts remote connections. This is on by default in modern editions but can be turned off, which produces error 53 from remote clients while local connections still work.
EXEC sp_configure 'remote access', 1;
RECONFIGURE;
How to prevent it
Use correct, tested connection strings and keep them in one place. Prefer tcp:server,port for the default instance and server\instance for named instances, and confirm the value against the running service rather than assuming it. See the connection and security guide for the moving parts.
Document each server, its instance name, and the port it listens on, and script your firewall and protocol settings so a rebuilt or restarted host comes back reachable without manual clicking. Scripting New-NetFirewallRule and the Browser service into your provisioning removes the guesswork that produces most error 53 tickets.
Common questions
How is SQL Server error 53 different from error 10061?
Error 53 means the client could not find or reach a SQL Server at all (a wrong name, stopped service, disabled protocol, or blocked port), so nothing answered. Error 10061 means the client did reach the host but the connection was actively refused, usually because the SQL Server service is not listening on the port the client tried. Error 53 is "no path to a server," while 10061 is "reached the host, but the port was closed."
Why does error 53 mention Named Pipes when I connect over TCP/IP?
The provider text names whichever protocol the client fell back to last. When TCP/IP is disabled, wrong, or blocked, the client tries the Named Pipes provider and that final attempt is what appears in the message. It does not mean Named Pipes is the real problem; treat the message as a generic "could not reach the server" and check the name, service, TCP/IP setting, and firewall.
How do I fix SQL Server error 53?
Work down a short list on the SQL Server host: confirm the exact server and instance name, make sure the SQL Server service is running, enable TCP/IP in SQL Server Configuration Manager and restart, open the instance port (default TCP 1433) in Windows Firewall, and for named instances start the SQL Server Browser service and allow UDP 1434. Test each step with sqlcmd -S ServerName until the connection succeeds.