How to test SQL Server connectivity


When you install a new SQL Server instance, you need to confirm that other machines are able to connect to it in a propper fashion. Since I’m a developer, I have created a custom application for this where developer can test their .NET connection string that they use in app.config and web.config.

But there are an easier way of doing this by using “Microsoft Data Link” with the following steps:

  1. create a .txt file on your desktop.
  2. rename file to .udl
  3. dobble-click on the file
  4. enter the appropriate connection parameters
  5. click on “test connection button to test

When you double-click on the .udl file, the “Connection” tab will appear in the Data Link Properties dialoguebox. In this tab you will enter the servername, username and passord (if not current windows login shall be used, and the database you will test. But first you have to set the correct db providere.

test_conn_2

The following screenshot shows the provider tab. For our case, we should select the “SQL Server Native Client” provider.

test_conn_1

When the SQL Server Native provider is selected, you go back to the “Connection” tab, and press the “Test Connection” button.

 

test_conn_3

If this test is successfull, you have confirmed that

  • SQL Server Service is running and a correct TCP/IP network protocol is enabled
  • ports are open between the two machines
  • username and password (logon credentials) is correct and connect to the target SQL Server instance and database

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s