Error with DBCC CHECKDB

  • I am getting error while executing DBCC CHECKDB on one database that shows

    CHECKDB found 0 allocation errors and 1 consistency errors in database 'My_Usage'.

    repair_rebuild is the minimum repair level for the errors found by DBCC CHECKDB (My_Usage).

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Marketing_Person'(ID 010). Data row does not have a matching index row in the index 'IX_CUSTOM_01832193'(ID 2). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Can any one please suggest me how to proceed to fix this issue....

    Thanks in Advance:-)

  • Drop and recreate the index, would be the quickest solution.

  • DBCC CHECKDB ('DBName', REPAIR_REBUILD) WITH ALL_ERRORMSGS

  • 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

  • I will still recommend for Repair_rebuild as it repairs extra keys in nonclustered indexes + rebuilds indexes and NO DATA LOSS..

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply