I have setup a SQL Server 2019 instance on my machine which has a computer name in a format like this:


My SQL instance is named 'SQL2019', therefore I connect to my local SQL instance by supplying the following name:


I have scripts which rely on server aliases, e.g.

  • Alias1
  • Alias2

To set these up, I navigated to the 'Sql Server Configuration Manager' and performed the following steps:

  1. Navigate to 'Protocols for SQL2019' and enabled 'TCP/IP'
  2. Navigated to the 'Aliases' for 'SQL Native Client 11.0 Configuration (32bit)'
  3. Created the alias 'Alias1' pointing to my server name: AB-ABC1234ABAB\SQL2019 and protocol 'tcp'
  4. Repeated above step for alias 2
  5. Repeated above two steps for the 'SQL Native Client 11.0 Configuration' also.
  6. Opened Windows Services and restarted the 'SQL Server (SQL2019)' service.

enter image description here

In SQL Server Management Studio, I have connected to my instance using Windows authentication, then I have created a new login and selected 'SQL Server authentication'. I have then been tested that login by logging in by specifying the computer name as the server (AB-ABC1234ABAB\SQL2019). Then I have disconnected and typed the alias name (e.g. Alias1) in the login box, selected SQL Server authentication and supplied the same login I used earlier.

When I do this, the connection attempt times out. It appears neither alias works for me.

Error I get is the standard one, e.g. "provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)".

What steps can I take to troubleshoot this issue? Could the hyphen in the server name be cause for concern?

I noticed that if I delete the SQL alias I get a slightly different error: "error: 40 - Could not open a connection to SQL Server - the network path was not found."

1 Answer 1


The problem was that the 'SQL Server Browser' service was not running.

enter image description here

I right-clicked this, clicked 'Properties', set the start mode to 'Automatic' then manually selected to start the service.

  • Yes, when you use a named instance, such as an alias in your case, the SQL Server Browser must be running.
    – J.D.
    Mar 25, 2022 at 19:21
  • I fiddled back and forth with so many settings and suddenly it worked. But inside SSMS, if I try to run a connection for my instance SQLEXPRESS01 against the alias .\sqlexpress it does not work using : sqlcmd -S .\sqlexpress I am stuck by not being able to uninstall SqlExpress and reinstall it so my default SqlExpress instance is not possible for me to repair without reinstalling the OS, it looks like (maybe if I use a Docker Container or similar I could fix it up). But at least my alias is now working.. Jul 3, 2022 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.