Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Rebuilding an index can result in fragmented index when ALLOW_PAGE_LOCKS option is not enabled


View products that this article applies to.

Symptoms

When you perform an Index rebuild operation on a multicore machine, it might result in a fragmented index if ALLOW_PAGE_LOCKS option is disabled during the rebuild operation.

↑ Back to the top


Cause

This behavior is by design.

↑ Back to the top


Resolution

Enable page locks optionat index level using the following t-sql statement:
ALTER INDEX [index_name] ON [table_name] SET ( ALLOW_PAGE_LOCKS  = ON ) 




Another option would be to execute the rebuild index command using MAXDOP = 1 query hint so that the index is not rebuilt using parallelism.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2292737
Revision : 1
Created on : 1/7/2017
Published on : 12/17/2010
Exists online : False
Views : 505