Cumulative Update 20 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 20 (CU20) for SQL Server 2017. This update contains fixes that were released after the initial release of SQL Server 2017 and updates the SQL Server and Analysis services components to the following builds:

Component Product version File version
SQL Server 14.0.3294.2 2017.140.3294.2
Analysis Services 14.0.249.36 2017.140.249.36

 

Important notices

This article also provides important information about the following situations:

  • Pacemaker: A behavioral change is made in distributions that use the latest available version of Pacemaker. Mitigations methods are provided.
  • Query Store: You must run this script if you use Query Store and you have previously installed SQL Server 2017 Cumulative Update 2 (CU2).
  • Analysis Services CU build version: Beginning in SQL Server 2017, the Analysis Services build version number and SQL Server Database Engine build version number do not match. For more information, see Verify Analysis Services cumulative update build version.
     

Cumulative updates

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 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.
  • Microsoft recommends 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 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.

Notes

  • After future cumulative updates are released for SQL Server 2017, this and all previous CUs can be downloaded from the Microsoft Update Catalog. However, we recommend that you always install the latest cumulative update that is 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
13091545 4506023 FIX: Geocentric Datum of Australia 2020 is added to SQL Server 2014, 2016 and 2017 SQL Engine All
13401115 4536005 Improvement: Fix incorrect memory page accounting that causes out-of-memory errors in SQL Server 2017 and 2019 SQL Engine All
13359750 4541132 Improvement: Size and retention policy are increased in default XEvent trace system_health in SQL Server 2016, 2017 and 2019 SQL Engine All
13361135 4548523 FIX: Database creation to Azure blob storage from SQL Server 2017 or 2019 on Linux may fail with error SQL Engine All
13434971 4551720 FIX: Access violation exception occurs when promoting latches of frequently used database pages in SQL Server 2017 SQL Engine All
13431232 4548597 Improves speed of memory dump generation (filtered dumps) using Page exclusion bitmap mechanism. The PageExclusionBitmap is turned on by default in SQL Server 2017. SQL Engine All
13421859 4541096 FIX: Access Violation occurs when you run query on computed columns in SQL Server SQL performance All
12795916 4551220 FIX: Assertion error occurs when you run resumable index statement in SQL Server 2017 SQL performance All
13243017 4532432 Mssql-conf tool fails if IPV6 is disabled on the Linux system SQL Engine Linux
13398892 4548597 Extended Event session_nt_username name is truncated and reported incorrectly in SQL Server 2017. SQL Engine Linux
13367989 4539023 FIX: Analysis Services Execute DDL task may fail to impersonate the user context to the remote Analysis services instance in SQL Server 2017 Analysis Services Windows
13421896 4540385 FIX: DAX query causes server to have exceptions in TBB heap and crash in Windows heap in SQL Server 2016 and 2017 Analysis Services Windows
13378811 4548597 DMV query $system.DISCOVER_STORAGE_TABLES may execute slowly against in-memory model which contains many tables and large table row counts in SQL Server 2017. Analysis Services Windows

 13421879

4541300 FIX: Fix incorrect values in auto seeding XEvents in SQL Server High Availability Windows
13421857 4541303 FIX: Non-yielding Scheduler error may occur with Always On availability group in Microsoft SQL Server High Availability Windows
13421855 4541309 FIX: Missing log block may occur when you use Always On availability group in SQL Server High Availability Windows

 13047035

4551221 FIX: Error occurs when you try to create a differential backup on secondary replica in SQL Server 2017 High Availability Windows
13431247 4541283 Access violation occurs when you enable Parallel Recovery by turning of Trace Flag 3459 during runtime and there is in-memory table in the database. High Availability Windows
13421864 4541724 FIX: Intermittent non-yielding scheduler occurs when memory-optimized database running under heavy I/O activities in SQL Server In-Memory OLTP Windows
13368462 4541762 FIX: Management Data Warehouse Server Activity Collection Set may fail in SQL Server Management Tools Windows
13421888 4539815 FIX: Access violation occurs when change tracking auto cleanup tries to clean up side tables in SQL Server SQL Engine Windows
13421885 4540107 FIX: System or background task may fail when number of sessions reaches the maximum limit in SQL Server 2016, 2017 and 2019 SQL Engine Windows
13421915 4540342 FIX: Non-yielding scheduler condition occurs with CONNECTION_MANAGER spinlock in SQL Server SQL Engine Windows
13421901 4540903 FIX: Non-yielding scheduler dump occurs in InterlockedCompareExchangePointer and SOS_RWLock in SQL Server 2016, 2017 and 2019 SQL Engine Windows

 13421875

4541435 FIX: Error occurs when you rename a column on temporal current table in SQL Server SQL Engine Windows
13421862 4541520 FIX: Assertion occurs when you process a malformed XML message sent as message in Service Broker queue in SQL Server SQL Engine Windows

 13421881

4541770 FIX: Assertion failure occurs when persistent log buffer is used in SQL Server SQL Engine Windows
13388961 4552478 FIX: Distribution Agent "Parameterized values for above command" log message missing after SQL Server 2017 upgrade SQL Engine Windows
13378402 4548597 Floating point exception error occurs during Clustered Columnstore Index Rebuild in SQL Server 2017. SQL Engine Windows
13421877 4548597 Non-yielding scheduler dump in InterlockedCompareExchangePointer and SOS_RWLock on the publisher in SQL Server 2017. SQL Engine Windows
13421868 4539880 FIX: Access violation occurs with wait_info XEvent on busy SQL Server SQL performance Windows
13421906 4540346 FIX: MERGE statement fails with assert “Attempt to access expired blob handle (1)” in SQL Server 2016, 2017 and 2019 SQL performance Windows
13421851 4543027 FIX: Parallel sampled filtered statistics may cause incorrect histogram scaling in SQL Server SQL performance Windows
13375414 4541283 When you run a query against a table with filtered index, the query may fail and stack dump may be generated. SQL performance Windows
13380148 4548597 Memory dump may be generated for non-yielding scheduler condition (message 17883) when query plan is forced (using QDS, Plan Guide or USE PLAN hint) for queries that contain large number of joins. Having adaptive join feature enabled increases the risk of seeing this issue for complex queries. SQL performance Windows
13421910 4540901 FIX: SQL Server may terminate due to lock conflicts during error message processing in SQL Server 2016, 2017 and 2019 SQL security Windows

Notes for this update


Hybrid environments deployment

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

More CU 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.

Pacemaker notice


IMPORTANT

All distributions (including RHEL 7.3 and 7.4) that use the latest available Pacemaker package 1.1.18-11.el7 introduce a behavior change for the start-failure-is-fatal cluster setting when its value is false. This change affects the failover workflow. If a primary replica experiences an outage, the cluster is expected to failover to one of the available secondary replicas. Instead, users will notice that the cluster keeps trying to start the failed primary replica. If that primary never comes online (because of a permanent outage), the cluster never fails over to another available secondary replica.

This issue affects all SQL Server versions, regardless of the cumulative update version that they are on.

To mitigate the issue, use either of the following methods.

Method 1

Follow these steps:

  1. Remove the start-failure-is-fatal override from the existing cluster. 
       # RHEL, Ubuntu         pcs property unset start-failure-is-fatal         # or         pcs property set start-failure-is-fatal=true   # SLES         crm configure property start-failure-is-fatal=true
  2. Decrease the cluster-recheck-interval value. 
       # RHEL, Ubuntu         pcs property set cluster-recheck-interval=<Xmin>   # SLES         crm configure property cluster-recheck-interval=<Xmin>
  3. Add the failure-timeout meta property to each AG resource. 
       # RHEL, Ubuntu         pcs resource update ag1 meta failure-timeout=60s   # SLES         crm configure edit ag1      # In the text editor, add `meta failure-timeout=60s` after any `param`s and before any `op`s
     

    Note In this code, substitute the value for <Xmin> as appropriate. If a replica goes down, the cluster tries to restart the replica at an interval that is bound by the failure-timeout value and the cluster-recheck-interval value. For example, if failure-timeout is set to 60 seconds and cluster-recheck-interval is set to 120 seconds, the restart is tried at an interval that is greater than 60 seconds but less than 120 seconds. We recommend that you set failure-timeout to 60s and cluster-recheck-interval to a value that is greater than 60 seconds. Setting cluster-recheck-interval to a small value is not recommended. For more information, refer to the Pacemaker documentation or consult the system provider.


Method 2

Revert to Pacemaker version 1.1.16.

    Query Store notice


    IMPORTANT

    You must run this script if you use Query Store and you are updating from SQL Server 2017 Cumulative Update 2 (CU2) directly to SQL Server 2017 Cumulative Update 3 (CU3) or any later Cumulative Update. Executing this script is not needed if you have previously installed SQL Server 2017 Cumulative Update 3 (CU3) or any later SQL Server 2017 Cumulative Update.

     

    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