SQL Server Network Interfaces: Error 26 – Error Locating Server/Instance Specifi

Can't connect to SQL Server? Fix the database error fast

Database Errors Intermediate 👁 1 views 📅 May 28, 2026

SQL Server won't connect? Usually it's a stopped service, a firewall block, or a bad instance name. Here's the shortest path to a fix.

First thing: check if SQL Server is even running

I had a client last month who spent an hour reinstalling drivers. Their SQL Server service had stopped after a Windows update. Don't be that guy.

Open Services.msc (Win+R, type services.msc, hit Enter). Look for these services:

  • SQL Server (MSSQLSERVER) — default instance
  • SQL Server (YOURINSTANCENAME) — named instance like SQLEXPRESS
  • SQL Server Browser — this one's critical for named instances

If the SQL Server service is Stopped, right-click it and hit Start. Set it to Automatic if it's not already. If the Browser service is stopped and you're using a named instance (like localhost\SQLEXPRESS), start it too.

Quick test: Try connecting from the local machine using SQL Server Management Studio (SSMS) with . (dot) or localhost as the server name. If that works, the problem is network-related. If it doesn't, the service might be dead or the instance name is wrong.

Still broken? Check the instance name and port

Error 26 almost always means the client can't resolve the instance name to a TCP/IP port and IP address. Here's what to do:

  1. Open SQL Server Configuration Manager (search for it in the Start menu).
  2. Go to SQL Server Network ConfigurationProtocols for [Your Instance].
  3. Make sure TCP/IP is Enabled. If it's disabled, right-click and Enable, then restart the SQL Server service.
  4. Right-click TCP/IPPropertiesIP Addresses tab.
  5. Scroll down to IPAll. Look for TCP Dynamic Ports — it should list a port number (usually blank for dynamic, or a fixed one). If it's blank, SQL Server will use a random port, which breaks named instance resolution. Set it to a fixed port like 1433 (default) or something like 14330 for a named instance.

Real-world trap: Named instances like SQLEXPRESS default to dynamic ports. I've seen this kill connections after a reboot because the port changed. Set a static port and never think about it again.

Firewall — the second most common killer

Even if SQL Server is running and listening, if the firewall blocks the port, you'll get Error 26 from any remote machine. Here's the fix:

  1. Open Windows Defender Firewall with Advanced Security (or whatever third-party firewall you use).
  2. Create an Inbound Rule for TCP port 1433 (or your static port from above).
  3. If you're using a named instance, also create a rule for UDP port 1434 — that's the SQL Server Browser port. Without it, remote clients can't discover the instance.
  4. Apply the rule to all profiles (Domain, Private, Public) if you're unsure. Better safe than sorry.

Quick test from a remote machine: Open Command Prompt and run telnet YOUR_SERVER_IP 1433. If it connects (blank screen or cursor), the port is open. If it says 'Could not open connection', the firewall or SQL Server isn't listening.

Advanced: double-check the connection string

I've debugged errors where the service was fine, ports were open, but the connection string had a typo. Here's the correct format:

  • Default instance: Server=YOUR_SERVER_IP;Database=YourDB;User Id=sa;Password=YourPass;
  • Named instance: Server=YOUR_SERVER_IP\SQLEXPRESS;Database=YourDB;User Id=sa;Password=YourPass;
  • With port: Server=YOUR_SERVER_IP,1433;Database=YourDB;...

Common mistake: Using localhost from a remote machine won't work. Use the actual IP or hostname. Also, if you're using a named instance and the Browser service is off, you must specify the port in the connection string.

Last resort: check the SQL Server error log

If nothing else works, look at the server-side logs. Open SSMS on the server, connect, and run:

EXEC xp_readerrorlog 0, 1, N'Server is listening on'

This shows you which IPs and ports SQL Server is actually listening on. If it says 'Server is listening on [ ::1]:1433', it's only listening on IPv6 localhost — that won't help remote IPv4 clients. You might need to enable IPv4 in the TCP/IP properties (IP1, IP2, etc.).

Another hidden gem: Check if SQL Server is set to listen on 'All IPs' or just specific ones. In Configuration Manager, TCP/IP Properties → IP Addresses → IPAll → TCP Port should have your port. If it's blank, set it.

Still stuck? Kill it with fire (a full restart)

If you've done all this and it still fails, restart the SQL Server service and the SQL Server Browser service. Then restart the client application. I've seen cached DNS or stale ARP tables cause error 26 that a full restart fixes.

One more thing: if you're using SQL Server Express, it defaults to named instances and dynamic ports. Change both to static and you'll never see error 26 again. Trust me on this one.

Was this solution helpful?