KB4466404 - Cumulative Update 13 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 13 (CU13) 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 Build version File version
SQL Server 14.0.3048.4 2017.140.3048.4
Analysis Services 2017.140.239.1


This article also provides important information about the following situations:

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/.


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


  • 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.
  • CU13 for SQL Server 2017 is intentionally released per the following schedule:
    • Microsoft Download Center: December 18, 2018
    • Microsoft Update Catalog: January 3, 2019
    This is done to comply with Microsoft Update policy not to release updates during the holiday season in the final weeks of the year.

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
12491221 4055674 FIX: Missing logs for Analysis Services Processing tasks in SQL Server 2016 and 2017 Integration Services Analysis Services Windows
12521739 4089239 FIX: QRY_PROFILE_LIST_MUTEX is blocked when TF 7412 is enabled in SQL Server 2016 and 2017 SQL performance All
12488513 4090032 FIX: Memory gets exhausted when you run Power BI report that executes DAX query on SSAS 2014, 2016 and 2017 Multidimensional mode Analysis Services Windows
12489781 4092997 VC++ 2015 Redistributable installation returns error 1638 when newer version already installed Setup & Install Windows
12245664 4340986 FIX: Access violation in cross data center failover if you use Always On Availability Groups in SQL Server High Availability Windows
12488520 4346803 FIX: Error occurs when you run sp_send_dbmail stored procedure that contains comma in sender email address and name in SQL Server 2014 and 2017 Management Services Windows
12488542 4456775 FIX: Can't retrieve ConnectionID and SPID when running an SSAS Profiler trace in SQL Server Analysis Services Windows
12478828 4457953 FIX: Access violations and unhandled exceptions when you set automatic seeding for secondary replica or Distributed Availability Group replica in SQL Server High Availability Windows
12495967 4458157 FIX: Assertion error occurs when you use sys.dm_exec_query_statistics_xml in SQL Server 2016 and 2017 SQL performance Windows
12466221 4458880 FIX: “9003 error, sev 20, state 1” error when a backup operation fails on a secondary replica that is running under asynchronous-commit mode SQL Engine Windows
12488539 4459327 FIX: Error 41317 when you enable server audit and you use in-memory transactions in SQL Server SQL security Windows
12488561 4459522 FIX: Slow query performance occurs when you use NULL filters on Partition Key with default CE in SQL Server 2016 and 2017 SQL performance Windows
12488533 4459535 FIX: Masked data is exposed when a query that uses sp_cursorfetch is run in SQL Server if Dynamic Data Masking is enabled SQL security Windows
12458033 4459981 FIX: Access violation occurs and SSAS crashes when you process an SSAS database in SQL Server 2014, 2016 and 2017 Analysis services Windows
12482229 4460112 FIX: Access violation when you run a query that uses the XML data type in SQL Server 2014 and 2017 SQL Engine Windows
12458029 4460116 FIX: Overestimations when using default Cardinality Estimator to query table with many null values SQL performance Windows
12488529 4463125 FIX: Error occurs when the Database Encryption Key is longer than 3,456 bits in SQL Server 2016 and 2017 SQL security Windows
12491210 4463320 FIX: Intermittent failures when you back up to Azure storage from SQL Server SQL Engine Windows
12488525 4463328 FIX: “An unexpected exception occurred” when you run an MDX query after an XMLA query to process a dimension in SSAS Analysis services Windows
12481579 4465443 FIX: The "modification_counter" in DMV sys.dm_db_stats_properties shows incorrect value when partitions are merged through ALTER PARTITION in SQL Server 2016 and 2017 SQL Engine Windows
12458045 4465867 FIX: "ran out of memory" error when executing a query on a table that has a large full-text index in SQL Server 2014,2016 and 2017 SQL Engine Windows
12422580 4466491 Improvement: You can set the minimum interval value to less 10 seconds for parallelly running SSIS packages in SQL Server 2017 Integration Services Windows
12510015 4466831 FIX: “A connection cannot be made” error when SSIS package uses a parameterized connection manager in SQL Server 2016 and 2017 Analysis Services Windows
12491228 4466994 FIX: "3414" and "9003" errors and a .pmm log file grows large in SQL Server 2016 and 2017 In-Memory OLTP Windows
12339101 4467058 FIX: Query plans are different on clone database created by DBCC CLONEDATABASE and its original database in SQL Server 2016 and 2017 SQL Engine Windows
12429556 4467119 FIX: Access violation occurs when you query data from a view created on a table with columnstore index in SQL Server 2016 and 2017 SQL Engine Windows
12409393 4467449 FIX: Pacemaker can't manage cluster resources in an Always On Availability Group in SQL Server High Availability Linux
12342904 4468102 FIX: Excessive memory usage when you trace RPC events that involve Table-Valued Parameters in SQL Server 2016 and 2017 SQL Engine All
12456181 4469292 FIX: Cannot connect to the MDS database by using the MDS Add-in for Microsoft Excel Data Quality Services (DQS) Windows
12431333 4469554 FIX: Assertion error occurs during restore of compressed backups in SQL Server 2014, 2016 and 2017 SQL Engine Windows
12428473 4469722 FIX: Internal error messages when you update a FILESTREAM tombstone system table in SQL Server SQL Engine Windows
12416026 4470411 FIX: Designing a parameterized DAX query in Report Builder Query Designer generates an exception in SSAS Analysis Services Windows
12478582 4470811 FIX: Log message displays “N/A” when using ring buffer target to hold extended event data in memory in SQL Server SQL Engine All
12475370 4470821 FIX: DBCC CHECKDB on master database fails with error 2570 when Common Criteria Compliance is enabled in SQL Server 2017 SQL Engine Windows
12527112 4470991 FIX: Access violation when you run a granular audit policy for DML in SQL Server SQL security Windows
12376480 4471213 FIX: Primary replica databases display "NOT SYNCHRONIZING" status when all replicas in AG use synchronous commit availability mode in SQL Server 2017 High Availability Windows
12486146 4479280 FIX: Restore of TDE-compressed backup is unsuccessful when backing up database to a 512-byte Emulation disk in SQL Server 2017 SQL Engine Windows
12517645 4479283 FIX: SQL Server installation fails if one of the remote nodes is unreachable in a cluster Setup & Install Windows
12347608 4480630 Enhancement adds sql_statement_post_compile extended event in SQL Server 2017 SQL performance Windows
12516851 4480631 FIX: DCExec crashes when you collect data on SQL Server 2017 Management Tools Windows
12535167 4480634 Improvement: IsAvailableInMDX feature can disable processing for specific columns in TREATAS function DAX query in SQL Server 2017 Analysis Services Windows
12521845 4480639 FIX: SQL Server service crashes when DBCC CHECKDB runs against a database that has a corrupted partition SQL Engine Windows
12536280 4480643 Improvement: Performance issue when you create or modify entities, attributes, users, or groups when page load permissions are used in SQL Server Data Quality Services (DQS) Windows
12545511 4480644 FIX: A dump file may be generated when you run the DML internal plan on Query Store enabled database in SQL Server 2017 SQL Engine All
12546696 4480645 FIX: Access violation when you query by using “sys.dm_db_tuning_recommendations” in SQL Server SQL Engine All
12549350 4480648 FIX: ObjectPropertyEx returns incorrect row count when there are partitions in a database object SQL Engine Windows
12542123 4480651 Improvement: Merge operation will consider the number of deleted rows in the rowgroup in SQL Server 2017 SQL Engine All
12373379 4480653 FIX: Error occurs when you run a query that includes a Boolean field against PolyBase external tables in SQL Server 2017 SQL Engine Windows
12385495 4480709 FIX: Error 18204 during automatic backup in virtual machines when the backup file is split into multiple files Management Tools Windows
12487676 4481148 FIX: Restore or Restore Verifyonly of a TDE-compressed backup fails with error 33111 and 3013 in SQL Server 2017 SQL Engine 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:

Cumulative update package information


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


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


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