This article describes Cumulative Update package 2 (CU2) 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|
If you use the Query Store feature, do not install this Cumulative Update 2 (CU2) (14.0.3008.27). Instead, install CU3 (14.0.3015.40).
If you have already installed CU2, after installing CU3 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] > 4AND [state] = 0 -- must be ONLINEAND is_read_only = 0 -- cannot be READ_ONLYAND [database_id] NOT IN (SELECT dr.database_id FROM sys.dm_hadr_database_replica_states dr -- Except all local Always On secondary replicasINNER JOIN sys.dm_hadr_availability_replica_states rs ON dr.group_id = rs.group_idINNER JOIN sys.databases d ON dr.database_id = d.database_idWHERE rs.role = 2 -- Is SecondaryAND dr.is_local = 1AND rs.is_local = 1)DECLARE @userDB sysname;WHILE (SELECT COUNT([database_id]) FROM #tmpUserDBs WHERE [IsDone] = 0) > 0BEGINSELECT TOP 1 @userDB = DB_NAME([database_id]) FROM #tmpUserDBs WHERE [IsDone] = 0-- PRINT 'Working on database ' + @userDBEXEC ('USE [' + @userDB + '];DECLARE @clearPlan bigint, @clearQry bigint;IF EXISTS (SELECT [actual_state] FROM sys.database_query_store_options WHERE [actual_state] IN (1,2))BEGINIF EXISTS (SELECT plan_id FROM sys.query_store_plan WHERE engine_version = ''14.0.3008.27'')BEGINDROP TABLE IF EXISTS #tmpclearPlans;SELECT plan_id, query_id, 0 AS [IsDone]INTO #tmpclearPlansFROM sys.query_store_plan WHERE engine_version = ''14.0.3008.27''WHILE (SELECT COUNT(plan_id) FROM #tmpclearPlans WHERE [IsDone] = 0) > 0BEGINSELECT TOP 1 @clearPlan = plan_id, @clearQry = query_id FROM #tmpclearPlans WHERE [IsDone] = 0EXECUTE sys.sp_query_store_unforce_plan @clearQry, @clearPlan;EXECUTE sys.sp_query_store_remove_plan @clearPlan;UPDATE #tmpclearPlansSET [IsDone] = 1WHERE plan_id = @clearPlan AND query_id = @clearQryEND;PRINT ''- Cleared possibly affected plans in database [' + @userDB + ']''ENDELSEBEGINPRINT ''- No affected plans in database [' + @userDB + ']''ENDENDELSEBEGINPRINT ''- Query Store not enabled in database [' + @userDB + ']''END')UPDATE #tmpUserDBsSET [IsDone] = 1WHERE [database_id] = DB_ID(@userDB)END
Cumulative updates (CU) are now available at the Microsoft Download Center for Windows.
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 they 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 Windows 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
Additional hotfixes that are included in this cumulative update package
Notes for this update
Hybrid environments deployment
- SQL Server failover cluster rolling update and service pack process
Note If you don't want to use the rolling update process, follow these steps to apply a CU or SP:
- Install the service pack on the passive node.
- Install the service pack on the active node (requires a service restart).
- Upgrade and update of availability group servers that use minimal downtime and data loss
Note If you enabled AlwaysOn with SSISDB catalog, see the information about SSIS with AlwaysOn for more information about how to apply a CU or SP in these environments.
- How to apply a hotfix for SQL Server in a transactional replication and database mirroring topology
- How to apply a hotfix for SQL Server in a replication topology
- How to install service packs and hotfixes on an instance of SQL Server that is configured to use database mirroring
- Overview of SQL Server Servicing Installation
Cumulative update package information
PrerequisitesTo apply this cumulative update package, you must be running SQL Server 2017.
Restart informationYou may have to restart the computer after you apply this cumulative update package.
Registry informationTo use one of the hotfixes in this package, you do not have to make any changes to the registry.
- Announcing updates to the SQL Server Incremental Servicing Model (ISM)
- SQL Server Service Packs are discontinued starting from SQL Server 2017
- The script to determine which version and edition of SQL Server Database Engine is running
- The Incremental Servicing Model for SQL Server to deliver hotfixes for reported problems
- Naming schema for Microsoft SQL Server software update packages
- Description of the standard terminology that is used to describe Microsoft software updates