Quick Database Connectivity Testing

Introduction

Ever find yourself needing to test connectivity, but you’re on a machine with no client tools? It happens to me occasionally. Here’s one trick to help:

UDL files

Right-click on the Windows Desktop, hover over New, and click Text Document:

Rename the file to test.udl:

Because you are changing the extension, you will be prompted:

Click Yes. Double-click the test.udl file to open the Data Link Properties window. Enter (or select) the server name, select integrated security or SQL Login and provide credentials, then select or enter a database name:

Click the Test Connection button to test connectivity:

Conclusion

There you have it – a way to test connectivity without database client tools installed!

:{>

Andy Leonard

andyleonard.blog

Christian, husband, dad, grandpa, Data Philosopher, Data Engineer, Azure Data Factory, SSIS guy, and farmer. I was cloud before cloud was cool. :{>

5 thoughts on “Quick Database Connectivity Testing

  1. Another way I’ve used before on web servers is to set up a new ODBC connection.  You can use the Test Connection button and then delete the connection you just created.

  2. There are these other possibilities for the outcome of the test step:
    1: Microsoft Data Link Error
    "Test connection failed because of an error in initializing provider.[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied."
    In my experience this is never actually access denied, and is always a connectivity problem. (firewall, port, ip, etc.)
    2: Microsoft Data Link Error
    "Test connection failed because of an error in ititializing provider. Login failed for user ‘<username>’."
    In contrast to the other error message, this one does indicate access was denied while the connection itself was successful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.