Sneaky Old DBA Trick for Checking Database Connectivity

One quick and dirty (but effective) way to check connectivity to a database server and specific database is to use a Microsoft Data Link applet. It does not require a development tool (like Visual Studio or SSMS). As long as you have a fairly recent version of Microsoft Data Access Components (MDAC) on your system, (which is included in Windows XP, recent versions of Internet Explorer, etc.), you will have it.

All you have to do is right-click on your Desktop and create a new text document file. Then change the file extension to .udl and save it. Then, double-click on the udl file, and presto, you will see something like this:

 

 

For reasons known only to Microsoft, it opens on the Connection tab. You need to change it to the Provider tab, (like you see below)

 

 

 Then you need to select the most appropriate OLE DB Provider from the list, and go back to the Connection tab, and enter your credentials.

 

 

Then click the "Test Connection" button, and hopefully you will be rewarded with this:

 

 

This tool uses OLE DB, which is an older Microsoft data access technology, but that is not the point. The point is that you can quickly confirm whether a server and database are up, whether you have network connectivity, whether you have the right credentials, etc. without having any sophisticated tools installed on a system. It will also work with any type of data source that you have a provider for. This is just one more troubleshooting tool in your arsenal.

 

Technorati Tags:
This entry was posted in SQL Server 2005. Bookmark the permalink.

9 Responses to Sneaky Old DBA Trick for Checking Database Connectivity

  1. Steve says:

    yeah that is an old trick, but I still use it all the time, not for testing connections as much anymore. Now I use it to build connection strings. Open the UDL in notepad/textpad and you have yourself a pre built connection string that you can use in applications. Although for .net apps you need to remove the provider section.

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