Symptoms

Assume that you have installed Microsoft SQL Server 2016 Service Pack 1 (SP1). When you use the SELECT TOP N statement with a very large N (tens or hundreds of thousands) to retrieve data from a columnstore index in batch mode, you get an access violation (AV) error.

Resolution

This issue is fixed in the following cumulative update for SQL Server:

       Cumulative Update 3 for SQL Server 2016 SP1

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Latest cumulative update for SQL Server 2016

Workaround

The temporary workaround for this issue is to remove the keyword TOP from SELECT statement or enable Trace Flag - TF 9453 to disable batch mode.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminologythat Microsoft uses to describe software updates.

Need more help?

Expand your skills

EXPLORE TRAINING >

Get new features first

JOIN MICROSOFT INSIDERS >

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×