FIX: High CPU usage when you execute an UPDATE statement that includes a "WHERE CURRENT OF <cursor>" clause in SQL Server 2008

Microsoft distributes Microsoft SQL Server 2008 Service Pack 3 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 fix release.
Symptoms
Assume that you have applied Cumulative Update 6 for Microsoft SQL Server 2008 Service Pack 2 or later. When you try to execute an UPDATE statement that includes a "WHERE CURRENT OF cursor" clause to update a table, the Sqlservr.exe process experiences excessive CPU usage.
Cause
This issue occurs because of a Halloween protection problem that is introduced in the cumulative update package. There is a great cost to this operation when the UPDATE statement is run in a long-running transaction.

For more information about Halloween protection in SQL Server, go to the following Microsoft Blogs website:
Resolution
Note This fix is only enabled under trace flag 2430. And it should be enabled per session.

Cumulative update information

SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 7 for SQL Server 2008 Service Pack 3. For more information about how to obtain this cumulative update package for SQL Server 2008 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
2738350 Cumulative update package 7 for SQL Server 2008 Service Pack 3
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Properties

Article ID: 2746341 - Last Review: 10/19/2012 07:50:00 - Revision: 2.0

Microsoft SQL Server 2008 Service Pack 3

  • kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2746341
Feedback
" clause in SQL Server 2008." />
" clause in SQL Server 2008." />