An information disclosure vulnerability exists in Microsoft SQL Server Analysis Services if it incorrectly enforces metadata permissions. An attacker could exploit the vulnerability if the attacker's credentials allow access to an affected Analysis Services database. To learn more about the vulnerability, go to CVE-2019-0819.
This security update fixes a potential leak of restricted data that is not protected correctly by the Object-Level Security (OLS) system in SQL Server Analysis Services.
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
How to obtain and install the update
Method 1: Microsoft Update
This update is available through Windows Update. When you turn on automatic updating, this update will be downloaded and installed automatically. For more information about how to turn on automatic updating, see Windows Update: FAQ.
Method 2: Microsoft Update Catalog
To get the standalone package for this update, go to the Microsoft Update Catalog website.
Method 3: Microsoft Download Center
The following file is available for download from the Microsoft Download Center:
Download the package now
Release Date: May 14, 2019
For more information about how to download Microsoft support files, click the following article number to go to the article in the Microsoft Knowledge Base:
Microsoft scanned this file for viruses by using the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to it.
Method 4: For SQL Server 2017 on Linux platforms and containers
- There is no corresponding Linux package for this release. The fix is in SQL Server Analysis Services, which does not ship on Linux.
Important If you install a language pack after you install this update, you must reinstall this update. Therefore, we recommend that you install any language packs that you need before you install this update. For more information, see Add language packs to Windows.
Security update deployment information
For deployment information about this update, see security update deployment information: May 14, 2019.
Security update replacement information
This security update replaces the previously released security update 4293805.
File hash information
|File name||SHA1 hash||SHA256 hash|
The English (United States) version of this software update installs files that have the attributes that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). The dates and times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and times may change when you perform certain operations on the files.