MSSQLSERVER_41396

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Details

Product Name

SQL Server

Event ID

41396

Event Source

MSSQLSERVER

Component

SQLEngine

Symbolic Name

MAX_SORT_ROWS_EXCEEDED

Message Text

The sort operation exceeded the buffer limit. The stored procedure execution was aborted. Consult SQL Server Books Online for more information.

Explanation

Natively compiled stored procedures perform sort operations in memory. There is a limit on the size of the sort buffer. This error means that the size of the sort buffer exceeds this limit. The sort operation and the stored procedure execution aborted.

The size of each row or entry in the sort buffer is determined by the number of rows sorted as well as the number of joins and the number and type of aggregate functions in the query. By simplifying the query, you can reduce the size of each row thereby fitting more rows in the sort buffer. The size of the rows in the base tables does not affect the size of each row or entry in the sort buffer.

User Action

Select fewer rows or decrease the complexity of the query by removing joins or aggregate functions.

See Also

Concepts

In-Memory OLTP (In-Memory Optimization)