kame
kame

Reputation: 21990

Connect to remote SQL Server - network-related or instance-specific error

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?

Upvotes: 4

Views: 14968

Answers (2)

ChathurawinD
ChathurawinD

Reputation: 784

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.

Upvotes: 1

Jayasurya Satheesh
Jayasurya Satheesh

Reputation: 8043

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

Upvotes: 0

Related Questions