Cumulative Update 4 for SQL Server 2017

Applies to: SQL Server 2017 on Windows (all editions)SQL Server 2017 on Linux (all editions)

This article describes cumulative update package 4 (build 14.0.3022.28) for Microsoft SQL Server 2017. This update contains fixes that were released after the release of SQL Server 2017.

IMPORTANT

When Cumulative Update 4 (CU4) is installed, customers may experience the following symptoms on SQL Server on Linux deployments with Pacemaker-managed Availability Groups.

  • Pacemaker immediately demotes the master replica of the AG resource to a slave, then never promotes any slave back to a primary.
  • 'crm_mon' shows no errors reported from the 'monitor', 'notify' or 'promote' actions of the 'ocf:mssql:ag' resource agent for the AG resource.
  • 'crm_simulate -sL' shows a promotion score of '-1' on all replicas of the AG resource.

To mitigate the problem, either

  1. Apply the mssql-server-ha.cu4.patch to the /usr/lib/ocf/resource.d/mssql/ag file on all nodes of the Pacemaker cluster where the mssql-server-ha package is installed. 
  2. Update to Cumulative Update 5 (CU5), which is a recommended option.
  3. Revert back to Cumulative Update 3 (CU3).

IMPORTANT

If you use the Query Store feature, and you have previously installed Cumulative Update 2 (CU2) (14.0.3008.27), the following requirement applies to you:

After you installing Cumulative Update 3 (CU3) (14.0.3015.40) or a later CU, you must immediately run the following script to delete all plans that were collected by Query Store while CU2 was installed:

SET NOCOUNT ON;DROP TABLE IF EXISTS #tmpUserDBs;SELECT [database_id], 0 AS [IsDone]INTO #tmpUserDBsFROM master.sys.databasesWHERE [database_id] > 4 AND [state] = 0 -- must be ONLINE AND is_read_only = 0 -- cannot be READ_ONLY AND [database_id] NOT IN (SELECT dr.database_id FROM sys.dm_hadr_database_replica_states dr -- Except all local Always On secondary replicas  INNER JOIN sys.dm_hadr_availability_replica_states rs ON dr.group_id = rs.group_id  INNER JOIN sys.databases d ON dr.database_id = d.database_id  WHERE rs.role = 2 -- Is Secondary   AND dr.is_local = 1   AND rs.is_local = 1)DECLARE @userDB sysname;WHILE (SELECT COUNT([database_id]) FROM #tmpUserDBs WHERE [IsDone] = 0) > 0BEGIN SELECT TOP 1 @userDB = DB_NAME([database_id]) FROM #tmpUserDBs WHERE [IsDone] = 0 -- PRINT 'Working on database ' + @userDB EXEC ('USE [' + @userDB + '];DECLARE @clearPlan bigint, @clearQry bigint;IF EXISTS (SELECT [actual_state] FROM sys.database_query_store_options WHERE [actual_state] IN (1,2))BEGIN IF EXISTS (SELECT plan_id FROM sys.query_store_plan WHERE engine_version = ''14.0.3008.27'') BEGIN  DROP TABLE IF EXISTS #tmpclearPlans;  SELECT plan_id, query_id, 0 AS [IsDone]  INTO #tmpclearPlans  FROM sys.query_store_plan WHERE engine_version = ''14.0.3008.27''  WHILE (SELECT COUNT(plan_id) FROM #tmpclearPlans WHERE [IsDone] = 0) > 0  BEGIN   SELECT TOP 1 @clearPlan = plan_id, @clearQry = query_id FROM #tmpclearPlans WHERE [IsDone] = 0   EXECUTE sys.sp_query_store_unforce_plan @clearQry, @clearPlan;   EXECUTE sys.sp_query_store_remove_plan @clearPlan;   UPDATE #tmpclearPlans   SET [IsDone] = 1   WHERE plan_id = @clearPlan AND query_id = @clearQry  END;  PRINT ''- Cleared possibly affected plans in database [' + @userDB + ']'' END ELSE BEGIN  PRINT ''- No affected plans in database [' + @userDB + ']'' ENDENDELSEBEGIN PRINT ''- Query Store not enabled in database [' + @userDB + ']''END')  UPDATE #tmpUserDBs  SET [IsDone] = 1  WHERE [database_id] = DB_ID(@userDB)END

Cumulative update

Cumulative updates (CU) are now available at the Microsoft Download Center.

Only the most recent CU that was released for SQL Server 2017 is available at the Download Center.

CU packages for Linux are available at https://packages.microsoft.com/.

Notes

  • Each new CU contains all the fixes that were included in 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.
  • Microsoft recommends ongoing, proactive installation of CUs as they become available:

    • 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 CUs before you deploy them to production environments.

Cumulative update

Cumulative updates (CU) are now available at the Microsoft Download Center.

Only the most recent CU that was released for SQL Server 2017 is available at the Download Center.

CU packages for Linux are available at https://packages.microsoft.com/.

Notes

  • Each new CU contains all the fixes that were included in 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.
  • Microsoft recommends ongoing, proactive installation of CUs as they become available:

    • 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 CUs before you deploy them to production environments.

How to obtain this cumulative update package for Windows


The following update is available from the Microsoft Download Center:
 
If the download page does not appear, contact Microsoft Customer Service and Support to obtain the cumulative update package.

Note After future cumulative updates are released for SQL Server 2017, this CU can be located and downloaded from the Microsoft Windows Update Catalog. However, Microsoft recommends that you install the latest cumulative update available.

How to obtain this cumulative update package for Linux


To update 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.

For installation instructions and direct links to the CU package downloads, see the Release notes.

Additional hotfixes that are included in this cumulative update package


VSTS bug number KB article number Description Fix area Platform
11281513 4042948 FIX: Data-driven subscription fails after you upgrade from SSRS 2008 to SSRS 2016 Reporting Services Windows
11281532 4053550 FIX: Processing XML message through Service Broker results in hung session in SQL Server 2016 and 2017 SQL Engine All
11281570 4052123 FIX: Sliding expiration for authentication cookie isn't working and fails to redirect to logon page in SSRS 2016 and 2017 Reporting Services Windows
11307676 4057054 FIX: CXPACKET and CXCONSUMER wait types show inconsistent results for some parallel query plans in SQL Server 2017 SQL performance All
11226058 4057087 FIX: Unable to restore a database using replace option if the FILENAME contains double slash operator in SQL Server 2017 SQL Engine All
11507782 4076982 FIX: Pacemaker demotes existing primary replica of an AlwaysOn AG in SQL Server 2017 on Linux and never promotes a new one High Availability Linux
11457913 4077103 FIX: In-Memory databases in an Availability Group hang during recovery in SQL Server 2017 In-Memory OLTP All
11457917 4077683 FIX: System stored procedure sp_execute_external_script and DMV sys.dm_exec_cached_plans cause memory leaks in SQL Server 2017 SQL Engine Windows
11035710 4055727 FIX: Recovery of database takes a long time when it contains memory-optimized tables in SQL Server 2016 and 2017 In-Memory OLTP Windows
11305031 4053439 Improvement: Move master database and error log file to another location in SQL Server 2017 on Linux SQL Engine Linux
11455811 4057759 FIX: Internal error when you drill down hierarchy members in SSAS 2016 and 2017 in multidimensional mode Analysis Services Windows
11281541 3010148 FIX: Non-admin role cannot receive correct ChildCount estimates for parent/child dimension leaf members in SSAS Analysis Services Windows
11281540 4052572 FIX: SSAS 2016 and 2017 crashes intermittently when you rename a multidimensional database by using script Analysis Services Windows
11524673 3216543 FIX: Many consecutive transactions inserting data into temp table in SQL Server 2016 and 2017 consume more CPU than in SQL Server 2014 SQL security Windows
11466444 4078301 Improvement: Increase the parallelism of external queries that can be executed by the modern Get Data experience in SSAS 2017 Tabular model Analysis Services Windows
11290048 4078302 FIX: Processing a tabular model database, table or partition takes longer to process in SSAS 2017 Analysis Services Windows
11296787 4078303 FIX: Access violation error in SSAS when a MDX query is executed in SQL Server 2017 Analysis Services Windows
11525703 4078288 FIX: PREDICT function does not return error message for missing columns and does not handle learning parameter for Tree/Forest models in SQL Server 2017 ML Services SQL Engine Windows
11511976 4077105 FIX: Out of memory error when the virtual address space of the SQL Server process is very low in SQL Server 2014 and 2017 SQL Engine Windows
11511978 4058565 FIX: Assertion error when executing a stored procedure that references a large object in SQL Server 2014 and 2017 SQL performance Windows
11405613 4055556 FIX: Error when you rebuild a single partition of an index online in SQL Server 2014 and 2016 SQL performance Windows
11455807 4056955 FIX: Queries that casts string or binary data to XML take a long time to compile in SQL Server 2016 and 2017 SQL security Windows
11455793 4037412 FIX: Error when SQL Server replication article contains either GEOGRAPHY_AUTO_GRID or GEOMETRY_AUTO_GRID SQL Engine Windows
11455794 4055456 FIX: "Incompletely installed" error on Feature Selection page when you modify the current installation of SQL Server 2016 SP1 or SQL Server 2016 SP1 CU5 Setup & Install Windows
11455797 4055281 FIX: "Msg 3948" error when you run a query on secondary replica of secondary availability group in SQL Server 2016 and 2017 High Availability Windows
11281547 4049027 FIX: "AdomdConnectionException" error when SSRS 2016 and 2017 data source uses msmdpump.dll Reporting Services Windows
11448088 4078095 Improvement: Improves the performance of SQL Server 2017 on smaller systems SQL Engine All
11457912 4078096 FIX: SQL Server shuts down after restart if C2 audit mode is enabled SQL Engine All
11317815 4078097 FIX: NEWSEQUENTIALID function generates duplicate GUID after SQL Server 2017 on Linux is restarted SQL Engine Linux
11448085 4078098 FIX: Database schemas aren't upgraded or downgraded when you install or uninstall a cumulative update in SQL Server 2017 on Linux SQL Engine All
11514491 4077899 FIX: PolyBase does not install because the installer does not recognize JRE 9 when you install SQL Server 2017 SQL Engine Windows
11455799 4056821 FIX: Log shipping fails when you use it together with Always On Availability Groups in SQL Server 2016 and 2017 High Availability Windows
11281550 4044064 FIX: "Request timed out" error when you change security options for an MDS security group in SQL Server 2016 and 2017 Data Quality Services (DQS) Windows
11455809 4057055 FIX: A deadlock occurs when you run a parallel query on a clustered columnstore index in SQL Server 2016 and 2017 SQL Engine Windows
11467181 4075203 FIX: Memory ramp-up phase is too long after TF834 is enabled in SQL Server 2017 on Linux SQL Engine Linux
11455814 4057280 FIX: High CPU usage when large index is used in a query on a memory-optimized table in SQL Server 2016 and 2017 In-Memory OLTP All
11455813 4057190 FIX: Error 14684 when you reconfigure Management Data Warehouse in a named instance of SQL Server 2016 and 2017 Management Tools Windows
11455788 4056117 FIX: Assertion occurs when you pass memory-optimized table variable into a stored procedure as table-valued parameter in SQL Server 2016 and 2017 SQL Engine Windows
11405622 4054398 FIX: "Invalid comparison due to NO COLLATION" retail assert occurs in SQL Server 2014 and 2017 SQL Engine Windows
11405603 4046745 FIX: UPDATE statement fails silently when you reference a nonexistent partition function in the WHERE clause in SQL Server 2014 or 2017 SQL Engine All
11281548 4048943 FIX: Access violation occurs on primary replica of AlwaysOn Availability Group in SQL Server High Availability Windows
11405608 4048967 FIX: Can't enable or disable change data capture for a database after you attach it in SQL Server 2014 or 2017 SQL Engine Windows
11281538 4048942 FIX: Memory dumps generated for "Stalled IOCP Listener" and "non-yielding IOCP listener" after SQL Server restart SQL Engine All
11454778 4074661 FIX: Compatibility level of msdb database remains at 130 by doing slipstream upgrade to SQL Server 2017 Management Tools Windows
11415502 4073684 FIX: Change data capture does not work in SQL Server 2017 SQL Engine Windows
11453962 4073670 FIX: Can't create a login based on a user that belongs to the parent domain in SQL Server 2017 on Linux SQL security Linux
11281552 4052633 FIX: SELECT query that uses batch mode hash aggregate operator that counts multiple nullable columns returns bad results in SQL Server SQL performance All
11281551 4045795 FIX: Thread pool exhaustion and CMEMTHREAD contention in AAG with data seeding in SQL Server 2016 and 2017 SQL Engine All
11281542 4040934 FIX: SQL Server Integration Service packages randomly hang if custom logging is enabled Integration Services Windows
11441099 4017445 FIX: A REDO thread is not available in the secondary replica after an availability database is dropped in SQL Server High Availability Windows
11317816 4073045 FIX: Unexpected memory consumption when TCP protocol connections are used for SQL Server 2017 on Linux SQL Engine Linux
11281563 4052121 FIX: Access violation for DMV queries run against a distributed availability group in SQL Server High Availability Windows
11281515 4052131 FIX: DMV sys.dm_os_windows_info returns wrong values for Windows 10 and Windows Server 2016 SQL Engine Windows
8898811 3192154  A non-optimal query plan choice causes poor performance when values outside the range represented in statistics are searched in SQL Server 2016 and 2017 SQL performance Windows

Notes for this update


Hybrid environments deployment

When you deploy the hotfixes to a hybrid environment (such as AlwaysOn, replication, cluster, and mirroring), we recommend that you refer to the following articles before you deploy the hotfixes:
 

Cumulative update package information


Prerequisites

To apply this cumulative update package, you must be running SQL Server 2017.

Restart information

You may have to restart the computer after you apply this cumulative update package.

Registry information

To use one of the hotfixes in this package, you do not have to make any changes to the registry.