question

user-87 (google) avatar image
user-87 (google) asked

Connection Refused

I am trying to connect to SQL 2005 via our VPN connection. Nothing seems to work. I can ping the server and the IP address but when connecting via management studio I get the "allow remote connections." error. Remote connections are enabled though.

sql-serverssmsconnection
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Whitfield avatar image
Matt Whitfield answered

Check the correct port is open. The default TCP/IP port for SQL Server is 1433. You can easily check that by opening a telnet session to the machine

telnet <ip address> 1433

If the screen goes blank, then you can connect to that port, otherwise you'll get an error something like: Could not open connection to the host, on port 1433: Connect failed.

If connecting via telnet doesn't work, then check the TCP/IP port the SQL server is running on, make sure it's right. If it is, tax your network guys for help.

If connecting via telnet does work, then check your connection string, you may need to add Network=DBMSSOCN; to your connection string to force it to connect via TCP/IP.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kev Riley avatar image
Kev Riley answered

Is the instance a default instance or named instance?

If you can telnet to 1433 as Matt suggests, but still cannot connect via SSMS, and it is a named instance, you may also need to open UDP 1434 for the SQL Server Browser Service.

More info here

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered

It might just be simple security. However you're logging in doesn't have permission to the server. A ping shows the server is online, but it doesn't show that you have access.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.