Network-related error SQL Origin: Data OSI layer 4 · Transport Last updated 14 Oct 2026

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.

Exact message you may see A network-related or instance-specific error occurrederror: 40 - Could not open a connection to SQL Servererror: 26 - Error Locating Server/Instance Specified
Seen on: SQL

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

  1. Enable TCP/IP and restart the service
  2. Open ports 1433 (and UDP 1434 for named instances)
  3. Use server,port explicitly (myhost,1433)
  4. Start SQL Server Browser

Detailed fix by platform

Windows

  1. Test-NetConnection sqlhost -Port 1433

How to diagnose

  1. Name — Correct server\instance?
  2. 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:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

102 — SQL Server: Incorrect syntax near 'x'. (Msg 102) (SQL)1022003 — MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'host:3306' (111) (MySQL)2003245 — SQL Server: Conversion failed when converting the varchar value 'x' to data type int. (Msg 245) (SQL)24540 — SQL Server Error 40: Could not open a connection to SQL Server (Named Pipes Provider) (SQL)404060 — SQL Server Error 4060: Cannot open database requested by the login. The login failed (SQL)4060544 — SQL Server: Cannot insert explicit value for identity column in table 'x' when IDENTITY_INSERT is set to OFF. (SQL)5448115 — SQL Server: Arithmetic overflow error converting expression to data type int. (Msg 8115) (SQL)8115certificate chain not trusted — SQL Server: The certificate chain was issued by an authority that is not trusted. (SQL)certificate chain not…Network-r…

Explore the map of this error Full error map →

🧠 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.