UDL files can be incredibly useful for a variety of reasons (please see my earlier post for details). In this article I will explain the steps for creating and configuring a UDL file.
Creating a UDL file is quite straightforward. Here are the steps:
- First create a new text document in Windows Explorer and give a name to your new file, making sure you set the extension to .udl (or you can open notepad and save it using .udl extension). Either way, make sure nothing is entered in the notepad document.
- Once you have created your new .udl file, the icon for your file should change from the icon for a text document to a special icon specific to .udl files
- Now double click your new .udl file in order to open it.
- Windows will bring up a .udl file editor that looks very similar to what one sees when setting up an ODBC data source.
- Click on the first tab of the .udl file editor. This is the Provider tab where you can select how you want to connect to your data source. To connect to MS SQL Server I usually select the option “Microsoft OLE DB Provider for SQL Server”. Here is an image of what the Provider tab looks like:
- Then either click the Next button or click the Connection tab. Here is an image of what the Connection tab looks like:
- On the Connection tab you will be able to select the details of how you will connect to the data source. For example when connecting to MS SQL Server you will be prompted to enter:
- The Server Name (ie: the network name of the database server you want to connect to)
- You can choose what account to connect with. This can either be using a network account, or a SQL Server user account
- A situationally useful option is given that allows you to save the password of the SQL Server user account you would like to use to connect to the database server. Although if misused it could be a security risk, this can be used when safely behind the network firewall and is quite useful when for example managing the credentials of a large number of reports.
- You are also asked to identify the database to connect to.
- Once you have provided the necessary information on the Connections tab, click the ‘Test Connection’ button. If all has gone well, the test will run and a message will appear saying that the test was successful. If so, then congratulations, you now have a working .udl file!
References:
3 thoughts on “UDL Files: How to Create and Configure Universal Data Link Files”