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!
:{>
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.
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.
Very handy! I have a VBS script that I use for this, but this is much simpler!
Thanks a lot, you have helped me.
Fantastic. Thank you.