Skip to content
Microsoft SQL Server

SQL Server Error 26

Error locating server or instance specified (SQL Network Interfaces)

Severity 20 Connectivity
Applies to: Any SQL Server version reached through SQL Server client drivers (ODBC, OLE DB, SqlClient) using a named instance
Last technically reviewed 23 October 2026 on SQL Server 2025 (17.0.1145.4), ODBC Driver 18 for SQL Server
The full message
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)
Other forms of this message
sqlcmd with ODBC Driver 18 (reproduced)
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. .
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to .\CWSNOSUCHN5. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
SQL Server Native Client (Microsoft documentation)
[Microsoft SQL Server Native Client 10.0]: Login timeout expired
[Microsoft SQL Server Native Client 10.0]: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
[Microsoft SQL Server Native Client 10.0]: SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Error number
26
Severity
20 (fatal: the connection ends; may indicate a serious problem)
State
0
Product
Microsoft SQL Server Database Engine
Versions
Any SQL Server version reached through SQL Server client drivers (ODBC, OLE DB, SqlClient) using a named instance
Category
Connectivity
Last reviewed
23 October 2026

What it means

Error 26 is a client-side error: the driver could not find the named instance you asked for, usually because the SQL Server Browser service did not answer on UDP 1434 or the instance name is wrong.

This page covers the client error 26 raised by the SQL Server Network Interfaces layer of the driver. It is not a SQL Server engine message: sys.messages has no message 26, and the engine never sees the attempt. A named instance (SERVER\INSTANCE) usually listens on a dynamic port, so before connecting the driver asks the SQL Server Browser service on the server, over UDP port 1434, which port the instance uses. When no answer comes back, or the answer does not list that instance, the driver gives up with error 26.

Read the provider part of the message: SQL Network Interfaces, error: 26 means the lookup of the instance failed, before any TCP connection to SQL Server. With ODBC Driver 18 the line reads Error Locating Server/Instance Specified [xFFFFFFFF] and is followed by Login timeout expired. Compare error 53 and error 40 (the server or pipe cannot be reached at all) and error 10061 (the port refused the connection).

Common causes

  • The instance name is misspelled, or the instance is a default instance and must be addressed without \INSTANCE.
  • The SQL Server Browser service is stopped or disabled on the server (it is needed only for named instances).
  • A firewall or router drops UDP 1434 between the client and the server.
  • The instance is hidden from SQL Server Browser, or the SQL Server service itself is not running.
  • The client resolves the server name to the wrong machine (stale DNS, HOSTS file entry or client alias).

Diagnose it

Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.

Get the real instance name and port (on the server)

Run locally on the server, where a shared memory connection does not need the Browser.

SELECT SERVERPROPERTY('MachineName')  AS machine_name,
       SERVERPROPERTY('InstanceName') AS instance_name,  -- NULL = default instance
       SERVERPROPERTY('ServerName')   AS server_name;
What to look for

instance_name NULL means a default instance: connect with the machine name alone. Otherwise use exactly machine_name\instance_name.

Which TCP port does the instance listen on?

SELECT ip_address, port, type_desc, state_desc
FROM sys.dm_tcp_listener_states
WHERE type_desc = 'TSQL';
What to look for

The port to put in the connection string (SERVER\INSTANCE,port or tcp:SERVER,port) to bypass the Browser. Rows only on 127.0.0.1 or ::1 port 1434 are the dedicated admin connection, which means TCP/IP for clients is not enabled.

Check the Browser service and UDP 1434

On the server, in PowerShell: Get-Service SQLBrowser should show Running. From the client, Microsoft suggests PortQry (or PortQryUI) against UDP 1434; a FILTERED result means the port is blocked on the way.

How to fix it

Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.

Correct the server and instance name

Client or network side

Use the exact name from SERVERPROPERTY('ServerName'). For a default instance drop the \INSTANCE part.

Connect with an explicit port instead of the instance name lookup

Client or network side

Adding the port skips the Browser lookup entirely. This is also the way to confirm the diagnosis: if the port works and the name does not, the Browser or UDP 1434 is the problem.

sqlcmd -S tcp:SQLPROD01,50123 -E
-- or in a connection string: Server=SQLPROD01\SALES,50123

Start SQL Server Browser and allow UDP 1434

Changes configuration

On the server, set SQL Server Browser to start automatically and allow inbound UDP 1434 in the firewall, so clients can resolve named instances.

Set-Service -Name SQLBrowser -StartupType Automatic
Start-Service -Name SQLBrowser
New-NetFirewallRule -DisplayName 'SQL Server Browser' -Direction Inbound -Protocol UDP -LocalPort 1434 -Action Allow

Give the instance a static port

Changes configuration

Where UDP 1434 cannot be opened, configure a static TCP port in SQL Server Configuration Manager, open that port in the firewall and put it in connection strings. Changing the port needs a service restart.

Caution: Restarting the SQL Server service disconnects every session; schedule it.

Examples

A named instance that does not exist on the machine

Reproduced with sqlcmd 17.0.1000.7 and ODBC Driver 18 on 2026-10-23 against the local machine, where no instance called CWSNOSUCHN5 exists. The driver waits for the login timeout (5 seconds here) before reporting.

sqlcmd -S .\CWSNOSUCHN5 -E -C -l 5
Result
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. .
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to .\CWSNOSUCHN5. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

How to prevent it

Document every named instance with its static port, and use SERVER\INSTANCE,port or tcp:SERVER,port in application connection strings so they do not depend on SQL Server Browser and UDP 1434.

Include the Browser service and the firewall rules in server provisioning scripts, and test new connection strings with sqlcmd from the application host before go-live.

Common questions

Is error 26 a SQL Server error?

No. It comes from the client driver (SQL Server Network Interfaces) while it looks up the named instance. SQL Server never receives the connection, so there is nothing in the SQL Server error log.

Why does the connection work with a port number but not with the instance name?

The instance name is resolved to a port through SQL Server Browser on UDP 1434. If the port works, the instance is fine and the Browser service or UDP 1434 is the problem.

Do I need SQL Server Browser for a default instance?

No. A default instance is reached on TCP 1433 (or the port you give) without the Browser. Adding a wrong \INSTANCE suffix to a default instance name causes error 26.

Learn more on CodeWithSQL

Official documentation

Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4), ODBC Driver 18 for SQL Server. Message text checked against the engine's sys.messages catalogue.

Still stuck on a SQL Server error?

Browse the full SQL Server error library, or get hands-on help from an experienced SQL professional.