dbcc indexalloc checks the specified index to see that:
All pages are correctly allocated.
No page is allocated that is not used.
No page is used that is not allocated.
dbcc indexalloc is an index-level version of dbcc checkalloc, providing the same integrity checks on an individual index, including checking for index partitions. You must specify either an object ID, an object name, or a partition ID, and you must specify an index ID. dbcc checkalloc and dbcc indexalloc include the index IDs in their output.
The syntax for dbcc indexalloc is:
dbcc indexalloc(object_name | object_id | partition_id, index_id [, {full | optimized | fast | null} [, fix | nofix]])
To use the fix or nofix option for dbcc indexalloc, you must also specify one of the report options (full, optimized, fast, or null). If you specify a partition ID, only that partition is checked. For details on using the fix and no fix options, see “Correcting allocation errors using the fix | nofix option”. For details on the reports, see “Generating reports with dbcc tablealloc and dbcc indexalloc”.
dbcc indexalloc treats unpartitioned indexes as an index with a single partition.
You can run sp_indsuspect to check the consistency of sort order in indexes and dbcc reindex to repair inconsistencies.
Copyright © 2005. Sybase Inc. All rights reserved. |