At times you’ll find yourself logged into a web or application server and need to simply test that if you can get to the SQL server you’ve unsuccessfully been trying to point your app at. Luckily there is a simple trick built into Windows that allows you to save the day without having to install anything on your box – and it works on both client and server operating systems just as well.
Why or When would i ever need this?
- Your app is having trouble connecting to SQL and you don’t know what’s wrong.
- Is something wrong with your app?
- Is it a network or firewall issue?
- Is SQL even there…?
The “so easy it almost can’t be true” solution
Some of the Developers at Microsoft have come up with this SQL Connectivity tool right into Windows with the creation of Microsoft Universal Data Link files (*.UDL) – something designed for another purpose.
These were designed as a way to save SQL connection data for use in a whole range of applications and are available on pretty much every version of Windows since *eternity*.
They also provide an awesome way to test SQL Connectivity.
To make this work simply follow the bouncing ball:
Create a new file anywhere. For arguments sake create a new Text file on your desktop
Now rename that file and change it’s file extension to TestDatabase.udl (take note of the file extension).
Select “Yes” when asked if you want to change the file extension.
This will give you a Data Link Editor that allows you to test the connection. Add the required details for connecting to your SQL server and Database to test the connection
Please don’t forget to share this with other if you find this helpful.