SQL Server: A network-related or instance-specific error occurred while establishing a connection to SQL Server. (provider: Named Pipes Provider, error: 40 / TCP Provider, error: 26)
The client couldn’t reach the SQL Server instance — wrong server name/instance, TCP disabled, firewall, or SQL Browser not running.
A network-related or instance-specific error occurrederror: 40 - Could not open a connection to SQL Servererror: 26 - Error Locating Server/Instance Specified Meaning
Named instances (SERVER\SQLEXPRESS) rely on the SQL Server Browser service (UDP 1434) or an explicit port. TCP/IP is disabled by default on Express.
Common causes
- Wrong server/instance name
- TCP/IP protocol disabled in SQL Server Configuration Manager
- Firewall blocking 1433/1434
- SQL Server/Browser service stopped
⚡ Quick fix
- Enable TCP/IP and restart the service
- Open ports 1433 (and UDP 1434 for named instances)
- Use server,port explicitly (myhost,1433)
- Start SQL Server Browser
Detailed fix by platform
Windows
Test-NetConnection sqlhost -Port 1433
How to diagnose
- Name — Correct server\instance?
- Network — Port reachable?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in SQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 14 Oct 2026