views:

238

answers:

4

If I can ping my DB server, is my SQL Server connection guaranteed to work? I am using a default connection string in my code. My program runs fine locally but overseas sites are having issues and I am wondering if SQL might be using a TCP or UDP port that is still blocked.

Here is the connection string "Data Source=xxxx.xxxx.com; Initial Catalog = xxxxx; User ID=xxxxx;password=xxxxx"

A: 

No. The SQL Server Service must at least be running on the server for any mssql connections to work. The server itself can be up - running and pingable without the SQL Server Serice running.

Jim Evans
+3  A: 

As far as I understand your question you are asking whether ICMP "ping" packet which returns guarantees you can open a connection on a particular TCP port? The answer is NO. It is also not the other way around - "ping" packets might be blocked by a firewall.

EFraim
A: 

You might also need to check whether the TCP/IP protocol is enabled using SQL Server Configuration Manager. Even when MSSQLSvc is running, it might not respond to remote requests.

Alex Peck
+2  A: 

telnet xxxx.xxxx.com 1433 might be a better indicator.

Remus Rusanu
...assuming that is your SQL port. A much better method though.
Chris Simpson