In most of the situations you may not have SQL Server Management Studio (SSMS), command line tools (SQLCmd, OSql, Isql) to check whether you are able to connect from given client to SQL Server or not. If you have ever called Microsoft SQL Support team for connectivity issue, “UDL Test” would be familiar to you.
UDL stands for Universal Data Link. Its “universal” means it is not just to test SQL Server connectivity test, but it works for other RDBMS as well. We can also get connection string using UDL file. Lets start with connectivity first.
To create UDL file, Right Click anywhere on desktop > New > Create a empty Text Document file.
Once you have text file, change the extension of the file to udl. A warning might appear, explaining that changing file extensions could cause files to become unusable, hit OK. In case you don’t see file extension: Open Windows Explorer, and on the Tools menu, click Folder Options. On the View tab, clear the Hide file extensions for known file types check box and then click OK.
As soon as you would change the extension icon would change as below.
Now, double click on the file and on the first tab “Provider”, choose appropriate provider. Since I am going to test connectivity to SQL, I have used “SQL Server Native Client 11.0” provider and hit “next”
Next tab is “Connection” which is about the login credentials. Think of the SSMS login screen and it has all the details asked. We can choose Windows/SQL Login. Everything is self-explanatory.
After choosing three settings, we can do a “test connection” and see whether this client is able to connect to SQL Server or not. In case of problem, correct error from native client would be thrown.
This is one of the test which every troubleshooter should know.