Sql-server – Cannot connect to remote SQL Server Express instance

remote-accesssql server

I'm trying to connect to a SQL Server Express database instance on a remote server. I've taken the following steps to make this possible:

  • Enabled Windows AND Sql authentication
  • Allowed for remote connections
  • Enabled TCP/IP
  • Enabled Named pipes (\.\pipe\MSSQL$SQLEXPRESS\sql\query)

For Windows Firewall I tried the following:

  • Added [path]\Binn\sqlservr.exe to exceptions
  • Added port 1433 to exceptions
  • Checked port in SQL Server log to which it is listening (1114) and added that to exceptions

Then I tried to connect through Sql Server Management Studio using the following server names:

  1. \[ipaddress]\pipe\MSSQL$SQLEXPRESS\sql\query
  2. [ipaddress]\SQLEXPRESS

Both fail with the error shown below. Am I missing something here?

Connect to Server: 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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

(I can ping the server by the way…)

Best Answer

I think you should specify the port used if you're not using the SQL Service Browser (which I think is not running on your machine).
As explained here you have two choices, use the SQL Service Browser or specify the port explicitely.