• rahul.rahuzz (8/6/2012)


    DBCC CHECKDB ('DBName', REPAIR_REBUILD) WITH ALL_ERRORMSGS

    Only use REPAIR.... options as a last resort, drop and recreate of the index would be the prefered option IMHO.

    Important note

    Use the REPAIR options only as a last resort. To repair errors, we recommend restoring from a backup. Repair operations do not consider any of the constraints that may exist on or between tables. If the specified table is involved in one or more constraints, we recommend running DBCC CHECKCONSTRAINTS after a repair operation. If you must use REPAIR, run DBCC CHECKDB without a repair option to find the repair level to use. If you use the REPAIR_ALLOW_DATA_LOSS level, we recommend that you back up the database before you run DBCC CHECKDB with this option.

    http://msdn.microsoft.com/en-us/library/ms176064.aspx