Back to Article List

Fix SQL error 26: Error locating server/instance specified

Fix SQL error 26: Error locating server/instance specified

Updated and tested 5 October 2026

MSSQL error 26 fires before authentication, before TLS and before the Database Engine has any idea someone is knocking. It's a discovery failure. The client asked the server machine which TCP port a named instance is listening on, waited and got nothing back. Understand that one exchange and the whole fix list below stops looking like a grab bag of unrelated tips.

Here's the message in full, as .NET reports it:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

What happens on the wire when a client resolves host\INSTANCE

A SQL Server named instance doesn't own a fixed port. It takes a dynamic TCP port at service start, and that port can change after a reboot. So when you hand a driver SQLBOX01\SQLEXPRESS, the driver has a hostname and an instance name and no idea where to send TDS traffic. It fills that gap with SSRP (SQL Server Resolution Protocol), and Microsoft's archived protocols blog on SQL Network Interfaces error 26 is still the clearest description of it: "Every time client makes a connection to SQL Server named instance, we will send a SSRP UDP packet to the server machine UDP port 1434. We need this step to know configuration information of the SQL instance, e.g., protocols enabled, TCP port, pipe name etc."

Listening on that UDP port is the SQL Server Browser service, which "reads the registry, identifies all instances of SQL Server on the computer, and notes the ports and named pipes they use", then "responds with the TCP/IP port or named pipe of the requested instance". Once the client has the port it opens a normal TCP connection and the real login begins.

A short detour into why any of this machinery exists. One machine used to mean one instance, and TCP 1433 was the whole answer. Once several instances could share a box, something had to tell a client which port belonged to which name, and the answer was a small resolution service listening on a well-known UDP port. In SQL Server 2000 that was the SQL Server Resolution Service, as Microsoft's MS02-039 security bulletin calls it. Today it is a separate Windows service, which is why the Browser looks like a component bolted onto the side of the product. It is one.

SQL error 26, error locating server/instance specified, means that reply never arrived. The archived page says it as plainly as anyone has since: "the reason that we get this error message is the client stack could not receive SSRP response UDP packet from SQL Browser." Note what that does not tell you. Nothing in it says the engine is down, nothing in it says your password is wrong, and TCP 1433 doesn't come into it at any point. A UDP datagram left and no UDP datagram came home.

Why a default instance on 1433 never produces error 26

A default instance is MSSQLSERVER and it listens on TCP 1433 unless somebody changed it. The client already knows the port from the protocol default, so there's no lookup and no SSRP packet. Microsoft's page on the SQL Server Browser service puts it in one line: with the Browser stopped, "you can connect to the default instance of SQL Server with TCP/IP if it's running on port 1433." Express installs as a named instance by default, which is why error 26 turns up far more often there than anywhere else.

Default port 1433 behaviour is a separate topic and none of it applies while an instance name is in the path. If your connection string has no backslash in the server name and you're still seeing error 26, look for an alias on the client machine or a driver inventing an instance name from somewhere in config. I have found both. The alias took longer.

Checklist for SQL error 26, error locating server/instance specified

1. Confirm the instance name against the instances that exist

Typos win more of these than anything else. SQLEXPRES with a letter dropped, or SQLServer typed on a box whose instance answers to SQLEXPRESS. A hostname copied from a different environment does it just as well. On the server, list what's there with the PowerShell snippet from Microsoft's connectivity troubleshooter:

Get-Service | Where {$_.status -eq 'running' -and $_.DisplayName -like "sql server*"}

A named instance shows up as MSSQL$INSTANCENAME. SQL Server Configuration Manager gives you the same list in a GUI, and newer versions of Windows might not list it as an app, so run SQLServerManager17.msc for SQL Server 2025 or SQLServerManager16.msc for 2022. From a Windows client, sqlcmd -L enumerates locally configured servers plus anything broadcasting on the network, though the docs warn that "sqlcmd might not receive a timely response from all servers", so an absent server there proves nothing on its own.

2. Confirm the SQL Server service is running

Obvious, and skipped often enough that it gets its own line. A stopped instance can still return error 26, because the Browser has nothing to report for it and the client never gets far enough to be refused.

3. Start SQL Server Browser and set it to automatic

In Configuration Manager, under SQL Server Services, find SQL Server Browser. State should be Running and Start Mode should be Automatic. Microsoft starts it automatically "when installing a named instance of the Database Engine, including all instances of SQL Server Express", but hardening scripts, group policy and well-meaning colleagues disable it constantly. A Browser set to Manual survives exactly one reboot's worth of luck.

4. Enable TCP/IP for the instance

On a new installation, TCP/IP is disabled for SQL Server Express and for Developer edition, and enabled for Enterprise, Standard, Web and Evaluation. Microsoft's table of default network protocol configuration carries the full grid. What it means in practice is a Developer edition instance on a fresh VPS accepting shared memory connections from the console and refusing everything from the network until you turn TCP/IP on. Configuration Manager, SQL Server Network Configuration, Protocols for your instance, set TCP/IP to Enabled, restart the service.

5. Open UDP 1434 on the host firewall

On Windows, one rule, and the protocol matters more than the number:

New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow

Microsoft's connectivity troubleshooting guide includes the reminder because it happens so often: "Make sure that you're opening a UDP port, not a TCP port." TCP 1434 is the Dedicated Admin Connection on a default instance, a completely different thing, and opening it does nothing for the Browser.

On Linux the Browser isn't in the picture at all, so the page to read there is enabling remote connections in SQL Server. On Ubuntu you are looking for a blocked TCP port and nothing else.

6. Open UDP 1434 on the cloud or provider firewall too

Host firewall and network firewall are two separate gates and both have to open. Security groups, network ACLs, provider-level firewall rules, an on-path appliance: any of them will silently drop a UDP datagram and give you an error 26 that looks identical to a Windows Firewall problem. Check both before you conclude the Browser is broken.

7. Check DNS and hosts resolution for the server name

The SSRP packet has to reach the right machine. ping SQLBOX01 and nslookup SQLBOX01 take five seconds and rule out a stale hosts entry or a name resolving to an old IP. Ping failing doesn't prove much on its own, since ICMP is blocked on plenty of networks, but a wrong IP in the answer proves a lot.

Skip the Browser with a static port and connect as host,port

Here's the fix I reach for on any server I own. It looks like a shortcut and it isn't. Give the named instance a fixed TCP port, leave the Browser out of the connection path, and error 26 becomes structurally impossible. You lose instance-name discovery, which matters for a workstation browsing a domain and matters not at all for an application server with a config file.

Find the port the instance is listening on now

Two reliable sources. The error log prints it at startup, in a line that looks like Server is listening on [ 'any' <ipv4> 1433], and that message means the instance is listening on every IPv4 address on the machine. From a session you already have, the DMV is quicker:

SELECT ip_address, port, type_desc, state_desc
FROM sys.dm_tcp_listener_states;

An ip_address of 0.0.0.0 is the IPv4 wildcard, and type_desc of Transact-SQL is the listener you care about (the other rows are Service Broker and database mirroring). The permission needed changed along the way: VIEW SERVER STATE on SQL Server 2019 and earlier, VIEW SERVER SECURITY STATE on 2022 and later, so a monitoring account that worked fine on an old box can come back empty on a new one.

Set a static port and restart

Open Configuration Manager, expand SQL Server Network Configuration, select Protocols for your instance, open TCP/IP properties and go to the IP Addresses tab. Scroll to the bottom, to IPAll. Clear TCP Dynamic Ports so the box is empty, put your chosen port in TCP Port, then restart the instance. Microsoft documents the whole sequence under configuring a server to listen on a specific TCP port. Pick something outside the ephemeral range and record it, because nothing on the machine will remind you later.

Then connect with a comma, which is the syntax everyone forgets at least once:

sqlcmd -S SQLBOX01,1435 -U appuser -P '<password>' -C
Server=tcp:SQLBOX01,1435;Database=orders;User Id=appuser;Password=<password>;Encrypt=True;TrustServerCertificate=False;

SQLBOX01\SQLEXPRESS,1435 also works and skips the Browser lookup just the same, since an explicit port always wins over discovery. The Browser docs confirm the principle: "If the SQL Server Browser service isn't running, you can still connect to the SQL Server if you provide the correct port number or named pipe." Whichever form you use, the port has to be open on TCP. One driver-side wrinkle sits underneath all of this: JDBC wants a colon in front of the port where every other client wants a comma, and that difference has produced at least one outage I know about, in the middle of a migration nobody wanted to be doing.

The rest of the per-driver detail is in the SQL Server connection string reference.

Your idea deserves better hosting

24/7 support 30-day money-back guaranteeRefund covers the VPS plan on your first order. Cancel anytime
Betalingscyclus

VPS.S1

$5.99 Save  17 %
$4.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 2 GB RAMGEHEUGEN
  • 30 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen

VPS.S3

$14.99 Save  33 %
$9.99 Maandelijks
  • 4 vCPU AMD EPYC
  • 6 GB RAMGEHEUGEN
  • 70 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen

VPS.S4

$19.99 Save  20 %
$15.99 Maandelijks
  • 6 vCPU AMD EPYC
  • 8 GB RAMGEHEUGEN
  • 80 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen

EPYC VPS.P1

$8.99 Save  22 %
$6.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 4 GB RAMGEHEUGEN
  • 40 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

EPYC VPS.P2

$16.99 Save  24 %
$12.99 Maandelijks
  • 2 vCPU AMD EPYC
  • 8 GB RAMGEHEUGEN
  • 80 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

EPYC VPS.P4

$29.99 Save  23 %
$22.99 Maandelijks
  • 4 vCPU AMD EPYC
  • 16 GB RAMGEHEUGEN
  • 160 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

EPYC VPS.P5

$39.99 Save  25 %
$29.99 Maandelijks
  • 8 vCPU AMD EPYC
  • 16 GB RAMGEHEUGEN
  • 180 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

EPYC VPS.P6

$59.99 Save  25 %
$44.99 Maandelijks
  • 8 vCPU AMD EPYC
  • 32 GB RAMGEHEUGEN
  • 200 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

EPYC VPS.P7

$69.99 Save  29 %
$49.99 Maandelijks
  • 16 vCPU AMD EPYC
  • 32 GB RAMGEHEUGEN
  • 240 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

Genoa VPS.G2

$24.99 Save  20 %
$19.99 Maandelijks
  • 2 vCPUAMD EPYC Genoa 4e generatie 9xx4 met 3,25 GHz of vergelijkbaar, op Zen 4-architectuur. AMD EPYC G4
  • 4 GB DDR5GEHEUGEN
  • 50 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

Genoa VPS.G4

$44.99 Save  22 %
$34.99 Maandelijks
  • 4 vCPUAMD EPYC processor met dedicated vCPU cores, op enterprise serverhardware. AMD EPYC G4
  • 8 GB DDR5GEHEUGEN
  • 100 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

Genoa VPS.G6

$89.99 Save  22 %
$69.99 Maandelijks
  • 8 vCPUAMD EPYC processor met dedicated vCPU cores, op enterprise serverhardware. AMD EPYC G4
  • 16 GB DDR5GEHEUGEN
  • 200 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

Genoa VPS.G7

$159.99 Save  22 %
$124.99 Maandelijks
  • 8 vCPUAMD EPYC processor met dedicated vCPU cores, op enterprise serverhardware. AMD EPYC G4
  • 32 GB DDR5GEHEUGEN
  • 250 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland. inbegrepen
  • Gratis auto back-upBevat één back-upslot dat je kunt instellen op dagelijks, wekelijks of maandelijks.

AMD Ryzen VPS.R1

$16.99 Save  18 %
$13.99 Maandelijks
  • 1 dedicated CPU AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 4 GB DDR5GEHEUGEN
  • 50 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

AMD Ryzen VPS.R2

$29.99 Save  17 %
$24.99 Maandelijks
  • 2 dedicated CPUs AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 8 GB DDR5GEHEUGEN
  • 100 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

AMD Ryzen VPS.R4

$109.99 Save  18 %
$89.99 Maandelijks
  • 8 dedicated CPUs AMD Ryzen 9 7950X met 4,5 GHz of vergelijkbaar, op Zen 4-architectuur. vCPU
  • 32 GB DDR5GEHEUGEN
  • 400 GB NVMeOPSLAG
  • Ongelimiteerde bandbreedte
  • IPv4 & IPv6 inbegrepen IPv6-ondersteuning is momenteel niet beschikbaar in Frankrijk, Finland of Nederland.
  • Auto back-up inbegrepen

*VAT excluded.

INCLUDED WITH EVERY PLAN

✓ No setup fees ✓1 Gbps network
✓ Full root access on KVM ✓ Free server monitoring ✓ Firewall management ✓24/7 support

Error 26 in Docker and other containers

There's no SQL Server Browser in the official mcr.microsoft.com/mssql/server images, and no named instance either. The container runs a single default instance and you publish its port:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<password>" \
   -p 1433:1433 --name sql1 --hostname sql1 \
   -d \
   mcr.microsoft.com/mssql/server:2025-latest

So localhost\SQLEXPRESS against a container will always fail, and it fails with error 26 because the driver dutifully sends an SSRP packet to a port where nothing is listening. Most of the failed connections in a SQL Server Docker container setup come down to that port mapping. Connect with localhost,1433, or with whatever host port you published: -p 14330:1433 means the client uses localhost,14330 while the container still hears 1433 internally.

Cannot connect to SQLEXPRESS with error 26

Express is where most of these queries come from, and several things pile up at once. It installs as the named instance SQLEXPRESS, so the Browser is mandatory unless you set a static port. Its TCP/IP protocol is disabled on a new installation. Plenty of Express machines are desktops with a firewall profile nobody has touched, and the Browser gets switched off by hardening baselines more often on a desktop than on a server.

Work through the list above in order and the problem usually falls out at step two. LocalDB is the thing that trips people here, because it is a separate mode of Express with its own connection form: (localdb)\MSSQLLocalDB, a process started on demand for the current user, reached over named pipes with no Browser and no TCP involved. If a colleague's connection string uses that and yours doesn't, you are comparing two different products. Which of the two you should be running in the first place is a different question, and the Express and Developer edition comparison answers that one.

Verify the SQL Server Browser is answering

Service state is the first check and Configuration Manager gives it to you: SQL Server Browser, State Running, Start Mode Automatic. That only proves the process is up on the server, not that a datagram from your client survives the trip. For the trip itself, nmap will probe UDP:

nmap -sU -p 1434 SQLBOX01

Read that result carefully, because UDP scanning is vague by nature. open means something replied and the Browser is alive. open|filtered means nothing came back, which is exactly what a firewall drop and a stopped service both look like from outside. That ambiguity is where I stop testing and go set a static port.

Once packets are moving, the next error you get comes from the engine, and the likely one is error 18456, login failed for user. That's progress. A dozen other messages worth recognising on sight sit in the SQL Server error cheat sheet.

One thing I still have no answer for. On two Windows hosts the Browser has come back after a reboot with its service state showing Running and still not answering a single datagram, and restarting the service fixed it both times. I never worked out why. By then the static port had made it somebody else's problem.

Questions?

Why does error 26 happen on one client but not another?

Something on the failing client's network path is dropping the Browser's UDP reply. Microsoft's connectivity guide names two cases: a router that won't pass UDP 1434, and a client operating system that discards a reply arriving from a different IP address than the one it queried, a Windows protection against "loose source mapping". Compare the route the working and failing clients take to the server, or skip the lookup on the failing one with an explicit port.

Jörg L. Günther
About the author

Jörg L. Günther

Jörg has spent much of his career in enterprise software, working first with database deployments and customer environments, then in technical training and documentation. Since then he has written for companies working in virtualisation, database tooling and cloud infrastructure. The subjects he takes on often have a large operational component: database migrations, high-availability setups, storage configuration and procedures carried out on live systems. Jörg lives near Frankfurt. He plays piano and cycles for transport as much as for recreation. He's also been doing woodworking for several years - he says most of the furniture in his study is his own work.

Deploy your next project in seconds

Bring your winning ideas online faster, with modern hardware and unmetered bandwidth. Join a European cloud trusted by thousands of developers and businesses worldwide.