2023-01-27

UDL-file connection to SQL Server

UDL is a component in Windows named Universal Data Link. To be more specific it is a OLE DB tool that is a connection defined in a UDL-file a with a GUI to edit the connection.

The file is usually crated as a empty file with the type ".udl".

The GUI has three tabs as follows:

Provider

A list of local available OLE DB providers for various sources like SQL Server components. The default provider is "Microsoft OLE DB Provider for SQL Server". But the provider "Microsoft OLE DB Driver for SQL Server" is the latest SQL Server provider which I will continue with here as I would recommend using it.

The provider "SQL Server Native Client" should be avoided as it is deprecated.

Connection

Basic connection configuration points are available here for different types of connection on the given provider. Some typical configuration points are:

  • Server name: The server name can be short or long (FQDN) and can also be with protocol and port information. If you try to select a server the UDL GUI will try to scan the network for a server.
  • Log on: The default is unfortunately "SQL Server Authentication" but I would recommend "Windows Authentication" in general. This also has a field for Server SPN if you want Kerberos authentication.
    There are other Active Directory log on that could be relevant to more special situations. These are not available with other providers.
  • Database: A drop-down filed where a database can be entered or selected. If you want to select a database the UDL GUI will try to connect to the server.
    A more special situation is the possibility to connect to a database file as a attached database. This is sometimes used in more dynamic development situations.
Also there is the button "Test Connection" where the text explains quite well what the button does.

Advanced

This tab will only show some other configuration points. The three tabs together will not show all configuration points.

All

This is the access to all configuration points on the given provider. Some point for timeout, encryption or Application Name are only available in UDL GUI here.

Edit file

After entering the values and saving them by clicking OK you can edit the UDL-file with a text editor. This way you can see a working example of a connection string with the given provider and configuration values. This can be quite handy when working on a effective connection string or a string with specific features.

Reference

Microsoft Docs: "Universal Data Link (UDL) configuration"

Microsoft Docs: "Microsoft OLE DB Driver for SQL Server"

2023-01-01

Top-ten posts 2022

2022 was a year with far fewer posts than expected. But there still were some activity on this blog.

The top-ten 2022 is a little different from top-ten 2021.

Rank Move Rank 2021 Title Views Created
1 0 1 SqlBulkCopy with PowerShell 1530 2017-07-30
2 >9 >10 Move table to filegroup 1390 2015-09-22
3 +3 6 Audit Log for Analysis Services 476 2014-01-08
4 -2 2 ISO 8601 date formatting using PowerShell 439 2008-08-14
5 N/A Windows Server 2022 preview on VMware Workstation 391 2021-03-10
6 -3 3 DBCC CHECKDB with PowerShell 384 2014-10-09
7 -3 4 xp_instance_regwrite syntax 150 2013-09-10
8 0 8 SQL Server Agent schedule owner 140 2010-02-08
9 >2 >10 Generate sqlcmd statements 93 2010-02-10
10 >1 >10 Sandbox Active Directory in VMware Workstation 82 2018-12-28

Some posts I have updated since the creation, and then the history is described in the post itself.
The oldest post is more than ten years old, and that I personally find quite satisfying.
There is more than ten times views difference between some posts which is significant.

The blog is more a personal collection of refined notes than public presentations. This is one of the reasons that I am fine with the limited amount of views.