Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

KB5016884 - Cumulative Update 31 for SQL Server 2017

Release Date:   September 20, 2022
Version:   14.0.3456.2

Note

Cumulative Update 31 is the last cumulative update for Microsoft SQL Server 2017. SQL Server 2017 is transitioned to extended support after October 11, 2022.

Summary

This article describes Cumulative Update package 31 (CU31) for Microsoft SQL Server 2017. This update contains 19 fixes that were issued after the release of SQL Server 2017 Cumulative Update 30, and it updates components in the following builds:

  • SQL Server - Product version: 14.0.3456.2, file version: 2017.140.3456.2
  • Analysis Services - Product version: 14.0.249.94, file version: 2017.140.249.94

Known issues in this update

Assume that a table used by replication uses a column that uses the NEWSEQUENTIALID function in the primary key. An error occurs when you attempt to apply the snapshot at the subscriber. Here are the commands attempted and error messages:

  • Command attempted:
create procedure [sp_MSupd_PersonAddress]

@c1 int = NULL,

@c2 nvarchar(60) = NULL,

@c3 nvarchar(60) = NULL,

@c4 nvarchar(30) = NULL,

@c5 int = NULL,

@c6 nvarchar(15) = NULL,

@c7 [geography] = NULL,

@c8 uniqueidentifier = NULL,

@c9 datetime = NULL,

@pkc1 uniqueidentifier = NULL,

@bitmap binary(2)

as

begin 

declare @primarykey_text nvarchar(100) = ''

if (substring(@bitmap,1,1) & 128 = 128)

begin

if @pkc1 is null

 set @pkc1 = (newsequentialid())

update [Person].[

(Transaction sequence number: 0x0000002400000F30005500000000, Command ID: 7)
  • Error messages:

The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression. (Source: MSSQLServer, Error number: 302)

Get help: http://help/302

Note

The only way to resolve this issue is to change the primary key column to the NEWID function while you take the snapshot and then set it back to the NEWSEQUENTIALID function after the snapshot is applied. You can run the following command:

ALTER TABLE [Person].[Address] DROP CONSTRAINT [PK_Address_rowguid]

GO

ALTER TABLE [Person].[Address] ADD CONSTRAINT [PK_Address_rowguid] DEFAULT (NEWID()) FOR [rowguid]

GO

ALTER TABLE [Person].[Address] DROP CONSTRAINT [PK_Address_rowguid]

GO

ALTER TABLE [Person].[Address] ADD CONSTRAINT [PK_Address_rowguid] DEFAULT (NEWSEQUENTIALID()) FOR [rowguid]

GO

Improvements and fixes included in this update

A downloadable Excel workbook that contains a summary list of builds, together with their current support lifecycle, is available. The Excel file also contains detailed fix lists for SQL Server 2019 and SQL Server 2017. Select to download this Excel file now.

Note

Individual entries in the following table can be referenced directly through a bookmark. If you select any bug reference ID in the table, a bookmark tag is added to the URL by using the "#NNNNNNNN" format. You can then share this URL with other people so that they can jump directly to the desired fix in the table.

For more information about the bugs that are fixed and enhancements that are included in this servicing update, see the following Microsoft Knowledge Base articles.

Bug reference Description Fix area Component Platform
14915051 Resolves the Denial of Service (DoS) vulnerability for the Newtonsoft library in SQL Server 2017. Analysis Services Analysis Services Windows
14676488 Error 9003 occurs with the incorrect log sequence number (LSN) when you do a subsequent restore after specifying the LSN at the virtual log file (VLF) boundary by using the RESTORE WITH STANDBY statement. Here's the error message:

Msg 3013, Level 16, State 1, Line <LineNumber>

RESTORE DATABASE is terminating abnormally.

Msg 9003, Level 17, State 11, Line <LineNumber>

The log scan number (<LogScanNumber>) passed to log scan in database '<DatabaseName>' isn't valid. This error may indicate data corruption or that the log file (.ldf) doesn't match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
SQL Server Engine Backup Restore Windows
14924205 Non-yielding dumps occur frequently on ColumnStoreAttributeCache::ColumnStoreColumnAttributeNode::GetSegmentById. SQL Server Engine Column Stores Windows
14989388 The filegroup IDs of the files that belong to the clone database can be incorrect if the source database has gaps in the filegroup IDs due to the removal of files or filegroups. When you try to insert data into the table that belongs to the incorrectly generated clone database, you receive an error message that resembles the following message:

Msg 622, Level 16, State 3, Line <LineNumber>

The filegroup "<FileGroupName>" has no files assigned to it. Tables, indexes, text columns, ntext columns, and image columns can't be populated on this filegroup until a file is added.
SQL Server Engine DB Management Windows
14964725 The FILESTREAM feature isn't enabled after you restart the operating system because of race conditions from multiple instances of SQL Server. In the error log, you can see the following error message:

Error: 5591, Severity: 16, State: 5. FILESTREAM feature is disabled.
SQL Server Engine FileStream and FileTable Windows
14860451 The read-only request still goes to the read-write primary node in an Always On availability group when the read-only routing list node goes down. SQL Server Engine High Availability and Disaster Recovery All
14904061 An assertion failure occurs on secondary replica when you use Always On availability groups in high-latency networks in SQL Server 2017.

You may see this assertion failure in the error log:

Assertion: File: <"e:\\b\\s3\\sources\\sql\\ntdbms\\storeng\\dfs\\trans\\lsnlocmap.cpp">, line=358 Failed Assertion = 'pos - pndx < map->EntryCount'
SQL Server Engine High Availability and Disaster Recovery All
14209349 Memory-optimized tempdb metadata (HkTempDB) keeps consuming memory under VARHEAP: LOB Page Allocator. SQL Server Engine In-Memory OLTP Windows
14923181 A memory leak occurs in the range index of in-memory tables after the parallel index scan. SQL Server Engine In-Memory OLTP All
14923920 A memory leak occurs under "Range Index Heap" on the in-memory table that has non-clustered indexes, whenever there are concurrent inserts. SQL Server Engine In-Memory OLTP All
13766490 Performance issues and deadlocks occur on SQL Server Agent in the msdb database that has automated backups. In addition, you see the following error messages in the SQL Server Agent log:

<DateTime> SQLServer Error: 1205, Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

<DateTime> Failed to retrieve job <JobID> from the server.
SQL Server Engine Management Services Windows
15009086 An access violation may occur after you apply SQL Server 2017 Cumulative Update 30 (CU30). This issue can occur when you perform a bulk insert operation followed by a SELECT statement in the same transaction, and the database's recovery model is either simple or bulk-logged. SQL Server Engine Methods to access stored data All
14979530 FIX: Installing SQL Server CUs may trigger IndexOutOfRangeException (KB5017551) SQL Setup Patching Windows
14976696 FIX: ParameterRuntimeValue is missing from the Showplan XML when you use the DMV sys.dm_exec_query_statistics_xml (KB5017788) SQL Server Engine Query Execution All
14876278 A non-yielding scheduler dump occurs in sqldk!SOS_MemoryWorkSpace::Lookup. SQL Server Engine Query Execution All
14918513 FIX: ForceLastGoodPlan doesn't account for aborted and timed out queries in regression detection logic (KB5008184) SQL Server Engine Query Store All
14810743 FIX: Error 20598 after adding columns that have default constraints as part of the primary key for an existing table and configuring transactional replication (KB5018231) SQL Server Engine Replication Windows
14914142 Error 208 occurs when you use thesp_changereplicationserverpasswords stored procedure to change stored passwords for the Microsoft SQL Server login used by replication agents. Here's the error message:

Msg 208, Level 16, State 1, Procedure master.sys.sp_MSchangerepltablepasswords, Line <LineNumber> [Batch Start Line 0]

Invalid object name 'MSreplservers'.
SQL Server Engine Replication Windows
14962805 High CPU usage occurs when you enable change tracking on a large number of tables and do automatic or manual cleanup of the change tracking tables. SQL Server Engine Replication Windows

How to obtain or download this or the latest cumulative update package

File information

Notes for this update

How to uninstall this update

Third-party information disclaimer

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

References


Feedback

Was this page helpful?

Additional resources