sp_indsuspect

Checks user tables for indexes marked as suspect during recovery following a sort order change.

Syntax

sp_indsuspect [tab_name]

Parameters

Examples

Usage

sp_indsuspect with no parameter creates a list of all tables in the current database that have indexes that need to be rebuilt as a result of a sort order change. With a tab_name parameter, sp_indsuspect checks the specified table for indexes marked as suspect during recovery following a sort order change.

Use sp_indsuspect to list all suspect indexes. The table owner or a system administrator can use dbcc reindex to check the integrity of the listed indexes and to rebuild them if necessary.

See also dbcc in Reference Manual: Commands.

Permissions

Any user can execute sp_indsuspect. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect