If you create server aliases for SQL Server connections, you should be aware of the changes introduced in SQL Server 2022. At SQLBI we use aliases to identify the server’s name in the connection of our sample files (Power BI files and Analysis Services model), so this short article should help those who face similar requirements.
If you install SQL Server 2022 on a computer that does not have any previous version of SQL Server, you will discover that the SQL Server Native Client is no longer part of the installation. As specified in Microsoft documentation, we should use the new Microsoft OLE DB Driver (MSOLEDBSQL) for SQL Server or the latest Microsoft ODBC Driver for SQL Server going forward. So far, so good, but the issue is what to do with the aliases’ configuration. In our training, we always suggested using the SQL Server Configuration Manager to configure client aliases for 32-bit and 64-bit. However, this is no longer possible because we used to do that through the SQL Native Client Configuration, which is now empty.
Clearly, one option at this point is to install the legacy SQL Server Native Client. However, the alias feature does not really depend on it, and an easier way to solve the problem without installing additional drivers is to use the SQL Server Client Network Utility (I found the solution on StackExchange). Because we want the aliases to work for both 32-bit and 64-bit applications, you should run the configuration tool twice – in a standard Windows installation; you should find the tools in these paths:
- C:\Windows\System32\cliconfg.exe (64bit),
- C:\Windows\SysWOW64\cliconfg.exe (32bit)
Each time, you should first enable the protocols (Named Pipes or TCP/IP or both):
Then, add the desired alias specifying one of the active protocols and the corresponding server name:
I will use this page many times in the coming months for new installations of SQL Server 2022!