How to ping/test connection to SQL Server without software (like through cmd)?

Viewed 22683

Is there a way to test a connection to a SQL Server through the command line or without any extra software? I've tried the ping and telnet methods shown in this article, but they both fail to find my SQL Server. Note that the connection is fine, I can connect to the server through SSMS, but it would be useful to be able to troubleshoot the connection otherwise.

For example, we have people working from home and I want to be able to test the connection to the database server without having to install SSMS on their machine.

The server name looks like: SERVER\SQLEXPRESS

And I tried ping SERVER\SQLEXPRESS (Ping request could not find host) and telnet SERVER 1433 (Could not open connection to the host, on port 1433)

EDIT: I can ping the server just fine ping SERVER

EDIT2: Everything I have tried I test with both the name and the ip. The DNS is fine so it shouldn't cause an issue to use one or the other

1 Answers

..it would be useful to be able to troubleshoot the connection otherwise.

For example, we have people working from home and I want to be able to test the connection to the database server without having to install SSMS on their machine.

Assuming your users are using windows you could send them a udl file.

If you create a blank text document and save it with the extension udl instead of txt. You can then double click the file. Below is an example of one I created on my desktop.

UDL File

Opening that file in windows will give you the following prompt and allow you to test connection.

UDL Prompt

You can do this yourself and send it to the user or walk them through it. I use it quite often when testing connectivity on boxes that don't have SSMS installed and it gives the added bonus of providing proper error messages.

Related