4

I can't connect to a remote SQL Server.

I get this error:

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)

On the remote machine, the SQL Server is running and port 1433 is open.

In my Visual Studio Server Explorer, the data connection to the remote database shows a little red cross. The state is closed. - I can't see the remote pc in the server name select field. But I can successfully ping the remote computer.

How to connect to the server?

EDIT:

My connection string: {Data Source=wsbd0311\SQLEXPRESS;Initial Catalog=rms;User ID=sa;Password=mypassword} (I can login with this Id and password.)

I allready set "Allow remote connctions to this server" on the remote SQL Server.

EDIT No.2:

Do I need to have an open port 1434 on the remote SQL Server?

2
  • Please show us your connection string Commented Oct 24, 2017 at 6:20
  • Are remote connections enabled on the server? Did you check if tcp\ip is enabled? Commented Oct 24, 2017 at 6:21

2 Answers 2

1

Make sure the server is running on the remote pc. Connect to the remote pc and check whether the SQL server instance is running on it by All Programs -> SQL Server -> SQL Server Configuration Manager -> Under SQL Server Services check whether the SQL Server service is on running state. If not try starting the service and connecting. Furthermore Enable TCP/IP under the Protocols for MS SQL Server which comes under SQL Server Network Configuration.

Sign up to request clarification or add additional context in comments.

Comments

0

You may be able to ping the server if the machine is turned on, but in order to connect to the SQL server instance, you should make sure that the SQL server is up and running on the server machine. Check this link for more details

How to Start, stop or restart SQL Server Instance

3 Comments

I wrote that the SQL server is running. I see a green dot with a white triangle in it.
Assuming both server and the client machine are on the same network, make sure that you have enabled remote logic for SQL Server in the Server configurations : learn.microsoft.com/en-us/sql/database-engine/configure-windows/…

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.