I have installed sql server 2012 Express on a local network machine, then added a new login: "sqlUser" mapped to "database1", and configured the instance to accept the remote access with both Windows and SQL Server authentication.

In the configuration manager -> SQL Server Network configuration -> Protocols for SQLEXPRESS -> TCP/IP properties, I have configured the IP to use TCP dynamic port: 12345 and TCP static ports is left blank, the IP2 have the static local IP address of the local network.

In the firewall I have added a new rule to allow the sql server program (exe) to accept remote connection.

Locally I can run SSMS and open database1 with both authentications using sqlUser account.

ping from the internet is successful. http site in the same sql server machine is reachable.

But when I want to access sql server instance from an internet machine using SSMS and sql server authentication:

Login:    sqlUser 
Password: pass123

I get the following error:

Cannot connect to\SQLEXPRESS.

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) (Microsoft SQL Server, Error: -1)

Any suggestion please ?

1 Answer 1


You should not need to specify the port for a named instance (that's kind of the point of the name - and since it's dynamic you won't want to hard-code a port into your connection strings etc. unless you want to change your config files every time the port changes). Try connecting to:\SQLEXPRESS

Also make sure that your server is exposed to the Internet on that port (firewalls may be preventing this) and that the SQL Browser service is running.

PS Ping means nothing. You need to try to telnet to the port that SQL Server is exposed on.

  • in addition, make sure you are not blocked by firewall etc. run this tool microsoft.com/en-us/download/details.aspx?id=24009 from client computer where you are trying to connect to remote SQL Express instance. Jan 15, 2013 at 14:34
  • I specified a dynamic port number to enforce security, thanks to the tool provided by @SQL Learner I verified that the server is listening on that port. Also SQL Server Browser is disabled since I do not need to connect using a name instead of an IP address.
    – Sami-L
    Jan 15, 2013 at 16:34
  • @Sami-L then try and leave the instance name out. You may also need to try using a comma instead of a colon (sorry don't have any relevant instances locally to test). Jan 15, 2013 at 17:54
  • @AaronBertrand that's it, I wasted too much time having made a stupid mistake, I used a colon instead of a comma. Thank you very much for your patience, sorry cannot vote up since I am new here.
    – Sami-L
    Jan 15, 2013 at 21:49

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.