FIX: Nonclustered index corruption may occur when you run a complex UPDATE statement together with a NOLOCK hint against a table in SQL Server

Article translations Article translations
Article ID: 2878968 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

When you run a complex UPDATE statement together with a NOLOCK hint against a table in Microsoft SQL Server 2008, SQL Server 2012, SQL Server 2008 R2, or SQL Server 2014, nonclustered index corruption may occur. Additionally, the following error message may be logged in the SQL Server error log:

<Date><Time> spid # Error: 8646, Severity: 21, State: 1.
<Date><Time> spid # Unable to find index entry in index ID 3, of table 2102402659, in database ‘<DatabaseName>'. The indicated index is corrupt or there is a problem with the current update plan. Run DBCC CHECKDB or DBCC CHECKTABLE. If the problem persists, contact product support.
<Date><Time> spid # Using 'dbghelp.dll' version '4.0.5'
<Date><Time> spid # **Dump thread - spid = 0, EC = 0x0000000BD70624C0
<Date><Time> spid # ***Stack Dump being sent to Y:\MSSQL\MSSQL10.MSSQLSERVER\MSSQL\LOG\SQLDump0003.txt
<Date><Time> spid # * *******************************************************************************
<Date><Time> spid # *
<Date><Time> spid # * BEGIN STACK DUMP:
<Date><Time> spid # * <Date><Time> spid#
<Date><Time> spid # *
<Date><Time> spid # * CPerIndexMetaQS::ErrorAbort - Index corruption
<Date><Time> spid # *

Note
You can apply a NOLOCK hint to source tables in a statement. However, you cannot apply a NOLOCK hint to target tables in a statement.

Cause

This issue occurs because the NOLOCK hint causes the query to incorrectly read values in the table when the query reads the same values multiple times.

Resolution

The issue was first fixed in the following cumulative update of SQL Server.

Cumulative Update 1 for SQL Server 2014

Cumulative Update 11 for SQL Server 2012

Cumulative Update 7 for SQL Server 2012 SP1

Cumulative update 13 for SQL Server 2008 SP3

Cumulative Update 9 for SQL Server 2008 R2 SP2

About cumulative updates for SQL Server

Collapse this imageExpand this image
assets folding start collapsed
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:
Collapse this imageExpand this image
assets folding end collapsed

Status

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

Properties

Article ID: 2878968 - Last Review: April 21, 2014 - Revision: 5.0
Applies to
  • Microsoft SQL Server 2008 Service Pack 3, when used with:
    • Microsoft SQL Server 2008 Enterprise
    • Microsoft SQL Server 2008 Developer
    • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 R2 Web
  • Microsoft SQL Server 2008 R2 Workgroup
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2012 Web
  • Microsoft SQL Server 2014 Developer
  • Microsoft SQL Server 2014 Enterprise
  • Microsoft SQL Server 2014 Standard
Keywords: 
kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2878968

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com