FIX: DBREINDEX on Large Tables May Cause High Number of Extent Lock Timeouts
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 362079 (SHILOH_BUGS)
Use of DBCC DBREINDEX to rebuild all the indexes on a table may cause a large number of extent lock timeouts (perhaps as high as several hundred thousand timeouts per second) for several seconds or minutes. This may periodically repeat itself during the reindexing process.
The same problem may also occur when you use a CREATE INDEX ... WITH DROP_EXISTING statement to rebuild the clustered index for a table.
The large number of lock timeouts causes the reindex operation to take longer than it should. CPU utilization also generally increases during the time that the lock timeouts are high.
The algorithm that SQL Server uses to search for free space to store the new index pages might end up repeatedly trying to acquire an extent lock that is not available yet.
In this case, the extent lock that SQL Server tries to acquire is an extent that was deallocated earlier in the reindex transaction, and it is not available for use until the transaction commits.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Version Size File name ------------------------------------------------------------ 13-Sep-2002 2000.80.685.0 7,467,089 bytes Sqlservr.exeNOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.
To work around this behavior, you can rebuild each index in a separate transaction, which substantially reduces the number of potential extents that are deallocated but remain unavailable for use. This dramatically reduces the number of timeouts and improves the time it takes to rebuild the indexes.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem typically becomes worse as the table size increases and the number of nonclustered indexes on the table increases.
The number of lock timeouts is most easily monitored by using Performance Monitor. Select the SQL Server:Locks object, and then select the Lock Timeouts/sec counter for the Extent instance.
Article ID: 329069 - Last Review: 01/17/2015 06:04:22 - Revision: 4.0
Microsoft SQL Server 2000 Standard Edition
- kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbbug kbfix KB329069