Create a .udl file of a connection string
- Last UpdatedFeb 24, 2025
- 2 minute read
You can use the Properties dialog box of a .udl file to build a connection string version of the OLE DB connection information, which you can save and examine to determine the values necessary to properly configure your OLE DB connector properties. The file type of a file with a file name extension of .udl is Microsoft Data Link.
To create a .udl file of a connection string
-
In the Folders pane of Windows Explorer, select the folder in which you want to save the .udl file.
-
In the results pane (on the right), right-click and point to New, and then click Text Document.
-
Rename the file with a meaningful name and a .udl file name extension; for example, Test.udl.
A message appears to confirm the change of the file name extension.
-
Click Yes.
-
Right-click the .udl file, and then click Properties. The Properties dialog box appears. Use this dialog box to create the OLE DB connection string.

-
On the Provider tab, select the required registered OLE DB provider.
-
Click the Connection tab.

-
Under step 1, select or enter the server name that you want to use. The drop-down list displays every running SQL server that is connected to your computer network.
-
Under step 2, enter the security information that is necessary to connect to the server that you selected. To use your current logon details for user name and password, select the Use Windows NT Integrated security check box.
-
Under step 3, select the database that you want to use from the server that you selected in step 1. This drop-down list is populated with the available databases for the selected server that can be accessed with the use of the nominated security settings.
-
Click Test Connection to test the connection to the SQL Server database. A message appears to confirm the connection.
-
Click OK.
-
On the Properties dialog box, click OK.
-
Open the .udl file in Microsoft Notepad to view the contents of the file, which are the properties that you require for the OLE DB data connection.
