KB5023127 - Cumulative Update 2 for SQL Server 2022
Article
07/26/2024
Applies to: SQL Server 2022 on Windows, SQL Server 2022 on Linux
Release Date: March 15, 2023 Version: 16.0.4015.1
Summary
This article describes Cumulative Update package 2 (CU2) for Microsoft SQL Server 2022. This update contains 13 fixes that were issued after the release of SQL Server 2022 Cumulative Update 1, and it updates components in the following builds:
SQL Server - Product version: 16.0.4015.1, file version: 2022.160.4015.1
After you install this cumulative update, external data sources using generic ODBC connector may no longer work. When you try to query external tables that were created before installing this cumulative update, you receive the following error message:
Msg 7320, Level 16, State 110, Line 68
Cannot execute the query "Remote Query" against OLE DB provider "MSOLEDBSQL" for linked server "(null)". Object reference not set to an instance of an object.
If you try to create a new external table, you receive the following error message:
Msg 110813, Level 16, State 1, Line 64
Object reference not set to an instance of an object.
A downloadable Excel workbook that contains a summary list of builds, together with their current support lifecycle, is available. The Excel file also contains detailed fix lists for SQL Server 2022, SQL Server 2019, and SQL Server 2017. Select to download this Excel file now.
Note
Individual entries in the following table can be referenced directly through a bookmark. If you select any bug reference ID in the table, a bookmark tag is added to the URL by using the "#NNNNNNN" format. You can then share this URL with others so that they can jump directly to the desired fix in the table.
For more information about the bugs that are fixed and enhancements that are included in this cumulative update, see the following Microsoft Knowledge Base articles.
Fixes an issue where the sqlcmd utility doesn't honor the sqlcmd command ":!!" when you run operating system (OS) commands. For more information, see sqlcmd commands.
Starting in SQL Server 2022 CU2, CREATE EXTERNAL DATA SOURCE supports the use of TNS files when connecting to Oracle by using the CONNECTION_OPTIONS parameter.
Fixes an issue where interleaved execution for multi-statement table-valued functions (MSTVFs) uses the OPTIMIZE FOR query hint value and returns an incorrect result on the first execution when the runtime constant value is different from the OPTIMIZE FOR query hint value. After you apply this fix, the interleaved execution will check the OPTIMIZE FOR query hint in all cases to avoid using the OPTIMIZE FOR query hint value on the first execution.
Fixes an issue that's caused by automatic parameterization of queries where interleaved execution of multi-statement table-valued functions (MSTVFs) may return incorrect results or cause a deadlock on the first execution.
Fixes an issue where the full cleanup failure in the first side table and partial cleanup failure in others can cause incorrect syscommittab table cleanup in change tracking auto cleanup. This issue can leave orphaned records in the side tables.
Fixes an issue where the DataAccess property for the linked server is reset to False when you execute the sp_addsubscription stored procedure or create a subscription through the New Subscription Wizard on server A after:
1. You have a linked server on server A for server B and have used the linked server for data access. 2. You configure server A as the Publisher and server B as the Subscriber and create transactional replication.
Before the fix, you can still enable transactional replication or change data capture (CDC) and delayed durability on a database at the same time, even if transactional replication or CDC and delayed durability aren't compatible. This fix explicitly prevents you from enabling transactional replication or CDC and delayed durability on a database at the same time by returning the following error 22891 or 22892:
22891: Could not enable '<FeatureName>' for database '<DatabaseName>'. '<FeatureName>' cannot be enabled on a DB with delayed durability set.
22892: Could not enable delayed durability on DB. Delayed durability cannot be enabled on a DB while '<FeatureName>' is enabled.
Fixes the incorrect primary key column indexing issue during the schema export phase of Azure Synapse Link replication. This issue occurs when you drop one or more columns that are in front of the primary key column of a table and then enable Azure Synapse Link replication for the table.
Microsoft Update Catalog contains this SQL Server 2022 CU and previously released SQL Server 2022 CU releases.
This CU is also available through Windows Server Update Services (WSUS).
We recommend that you always install the latest cumulative update that is available.
How to obtain or download the latest cumulative update package for Linux
To update SQL Server 2022 on Linux to the latest CU, you must first have the Cumulative Update repository configured. Then, update your SQL Server packages by using the appropriate platform-specific update command.
The English version of this package has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it's converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
To apply this cumulative update package, you must be running SQL Server 2022.
Restart information
You might have to restart the computer after you apply this cumulative update package.
Registry information
To use one of the hotfixes in this package, you don't have to make any changes to the registry.
Important notices
This article also provides the following important information.
Analysis Services CU build version
Beginning in Microsoft SQL Server 2017, the Analysis Services build version number and SQL Server Database Engine build version number don't match. For more information, see Verify Analysis Services cumulative update build version.
Cumulative updates (CU)
Each new CU contains all the fixes that were included with the previous CU for the installed version of SQL Server.
SQL Server CUs are certified to the same levels as service packs, and should be installed at the same level of confidence.
We recommend ongoing, proactive installation of CUs as they become available according to these guidelines:
Historical data shows that a significant number of support cases involve an issue that has already been addressed in a released CU.
CUs may contain added value over and above hotfixes. This includes supportability, manageability, and reliability updates.
We recommend that you test SQL Server CUs before you deploy them to production environments.
Hybrid environment deployment
When you deploy an update to a hybrid environment (such as Always On, replication, cluster, and mirroring), we recommend that you refer to the following articles before you deploy the update:
If you enabled Always On together with the SSISDB catalog, see the information about SSIS with Always On about how to apply an update in these environments.
SQL Server CUs are currently multilingual. Therefore, this CU package isn't specific to one language. It applies to all supported languages.
Components (features) updated
One CU package includes all available updates for all SQL Server 2022 components (features). However, the cumulative update package updates only those components that are currently installed on the SQL Server instance that you select to be serviced. If a SQL Server feature (for example, Analysis Services) is added to the instance after this CU is applied, you must reapply this CU to update the new feature to this CU.
Support for this update
If other issues occur, or if any troubleshooting is required, you might have to create a service request. The usual support costs will apply to additional support questions and to issues that don't qualify for this specific cumulative update package. For a complete list of Microsoft Customer Service and Support telephone numbers, or to create a separate service request, go to the Microsoft support website.
How to uninstall this update
How to uninstall this update on Windows
In Control Panel, open the Programs and Features item, and then select View installed updates.
Locate the entry that corresponds to this cumulative update package under SQL Server 2022.
Press and hold (or right-click) the entry, and then select Uninstall.
How to uninstall this update on Linux
To uninstall this CU on Linux, you must roll back the package to the previous version. For more information about how to roll back the installation, see Rollback SQL Server.
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.