Cumulative Update 3 for SQL Server 2017

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

Cumulative Update 3 (CU3) for Microsoft SQL Server 2017 was also released in the January 3, 2018, SQL Server Security Bulletin ADV180002. See KB 4058562 for more information. In other words, the same physical package (SQLServer2017-KB4052987-x64.exe) was made available both as CU3 (KB 4052987) and the Security Bulletin (KB 4058562).

Because of this, you may already have CU3 installed as part of that security release. If you do try to install CU3 after ADV180002, you may receive the following message:

There are no SQL Server instances or shared features that can be updated on this computer
This indicates that CU3 is already installed and that no further action is required.

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

IMPORTANT

If you use the Query Store feature and have previously installed Cumulative Update 2 (CU2) (14.0.3008.27), after installing CU3 (14.0.3015.40) or higher, you must immediately execute the following script to delete all plans 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.

How to obtain this CU 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 CU 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
11061716 4041811 FIX: Automatic update of incremental statistics is delayed in SQL Server 2017 SQL Performance All
11280500 4055735 FIX: DBCC CHECKDB returns consistency errors if SOUNDEX function is used in PERSISTED computed columns in SQL Server SQL Engine Windows
11061767 4038419 Update adds CPU timeout setting to Resource Governor workgroup REQUEST_MAX_CPU_TIME_SEC in SQL Server 2017 SQL Performance All
11061704 4041809 Update adds support for MAXDOP option for CREATE STATISTICS and UPDATE STATISTICS statements in SQL Server 2017 SQL Performance All
11061779 4041814 Improve tempdb spill diagnostics in DMV and Extended Events in SQL Server 2017 SQL Performance All
11061723 4041817 Update enables XML Showplans to provide a list of statistics used during query optimization in SQL Server 2017 SQL Performance All
11061781 4046914 FIX: Add CXPACKET wait type in showplan XML in SQL Server 2017 SQL Performance All
11230379 4056354 FIX: Mirroring session stops synchronizing after doing rolling upgrade to SQL Server 2017 High Availability Windows
11124264 4052127 FIX: Alert Engine reads complete Application event log and sends alerts on old events after Windows is restarted Management Tools Windows
11281561 4051356 FIX: In-memory database restore fails with errors in SQL Server 2016 and SQL Server 2017 In-Memory OLTP All
11300802 4056922 FIX: Unnecessary failover when you use AlwaysOn Availability Group in SQL Server 2017 on Linux High Availability Linux
11272738 4056328 FIX: Performance Counters are missing after the installation of SSAS 2017 in tabular mode Analysis Services Windows
11176915 4053293 Update to enable PolyBase technology in SQL Server 2017 SQL Engine Windows
11309598 4073393 FIX: "The data area passed to a system call is too small" error when you start a Centennial application on a SQL Server 2017 server SQL Engine Windows
11061737 4056154 Update adds execution statistics of a scalar-valued, user-defined function to the Showplan XML file in SQL Server 2017 SQL Performance All
11061785 4051361 Update adds optimizer row goal information in query execution plans in SQL Server 2017Update adds optimizer row goal information in query execution plans in SQL Server 2017 SQL Performance All

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.