dbcc indexalloc

dbcc indexalloc checks the specified index to see that:

dbcc indexalloc is an index-level version of dbcc checkalloc, providing the same integrity checks on an individual index. You can specify either the table name or the table’s object ID (the id column in sysobjects) and the index’s indid in sysindexes. dbcc checkalloc and dbcc indexalloc include the index IDs in their output.

The syntax for dbcc indexalloc is:

dbcc indexalloc ( {table_name | table_id }, index_id 
     [, {full | optimized | fast | null}
     [, fix | nofix]])

If you want to use the fix or nofix option for dbcc indexalloc, you must also specify one of the report options (full, optimized, fast, or null). 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”.

You can run sp_indsuspect to check the consistency of sort order in indexes and dbcc reindex to repair inconsistencies. For details see “Using sp_indsuspect to find corrupt indexes” and “Rebuilding indexes after changing the sort order”.