DBCC CheckTable returns following results, best way to deal with this?

  • Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_Advertise_BrandCopy_Price_Stock' (ID 69). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:11226494:9) identified by (Id = 11078215) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 137.50 and NSFPQtyInStock = 0 and Id = 11078215'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (ID 70). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:10834009:15) identified by (Id = 8885719) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 9.30 and NSFPQtyInStock = 0 and Id = 8885719'.

    These indexes were created days ago and are rarely used. Is it safe to drop and recreate corrupted indexes?

  • Also, neither is the PK or a FK or clustered.

  • As always I would suggest backups before any work is carried out but it should be ok to drop the index and recreate, you will have to perform an offline rebuild. Have a read of the blog below before you do anything:

    http://www.sqlskills.com/blogs/paul/teched-demo-nonclustered-index-corruption/

    Also would have a look at your disk subsystem as well, corruption would suggest an issue.

  • Please run the following and post the full, complete and unedited output.

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (3/12/2013)


    Please run the following and post the full, complete and unedited output.

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Running this now.

    EDIT: This may take some time. It's only 5% done with its initial @BlobEater step.

  • GilaMonster (3/12/2013)


    Please run the following and post the full, complete and unedited output.

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_Advertise_BrandCopy_Price_Stock' (ID 69). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:10834009:15) identified by (Id = 8885719) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 9.30 and NSFPQtyInStock = 0 and Id = 8885719'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_Advertise_BrandCopy_Price_Stock' (ID 69). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:10945035:10) identified by (Id = 9750456) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 34.40 and NSFPQtyInStock = 0 and Id = 9750456'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_Advertise_BrandCopy_Price_Stock' (ID 69). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:11226494:9) identified by (Id = 11078215) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 137.50 and NSFPQtyInStock = 0 and Id = 11078215'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (ID 70). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:10834009:15) identified by (Id = 8885719) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 9.30 and NSFPQtyInStock = 0 and Id = 8885719'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (ID 70). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:10945035:10) identified by (Id = 9750456) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 34.40 and NSFPQtyInStock = 0 and Id = 9750456'.

    Msg 8951, Level 16, State 1, Line 1

    Table error: table 'Items' (ID 1954106002). Data row does not have a matching index row in the index 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (ID 70). Possible missing or invalid keys for the index row matching:

    Msg 8955, Level 16, State 1, Line 1

    Data row (1:11226494:9) identified by (Id = 11078215) with index values 'AdvertiseFlag = 1 and BrandCopyParentId = 0 and NSFPPrice = 137.50 and NSFPQtyInStock = 0 and Id = 11078215'.

    CHECKDB found 0 allocation errors and 6 consistency errors in table 'Items' (object ID 1954106002).

    CHECKDB found 0 allocation errors and 6 consistency errors in database 'NewCatalog'.

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

  • Drop the indexes 'IX_Advertise_BrandCopy_Price_Stock' and 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (on the table 'Items') and recreate them. Don't rebuild them, drop and recreate.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (3/12/2013)


    Drop the indexes 'IX_Advertise_BrandCopy_Price_Stock' and 'IX_ITEMS_ADVFLAG_PARETN_PRICE_STOCK' (on the table 'Items') and recreate them. Don't rebuild them, drop and recreate.

    Doing so now. Our sysops guys checked the server and said there doesn't appear to be any issue with the hardware. How else can corruption like this occur?

  • IO subsystem problems in almost all cases. Could be as simple as a write cache that's not battery backed, could be misbehaving filter drives in the IO stack, etc.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (3/12/2013)


    IO subsystem problems in almost all cases. Could be as simple as a write cache that's not battery backed, could be misbehaving filter drives in the IO stack, etc.

    DROP and CREATE worked where REBUILD failed. Thank you.

    EDIT: I think I'll have to do some reading to understand your answer here though haha

  • I do have one further question. If there had been corruption in the clustered index, would I have needed to do a restore?

  • Actually it seems like the problem is still present. The SP that first indicated there was a corrupt index worked once after the drop/create and failed again after.

  • If the problem is still there, you have IO issues. It's not a SQL problem, but your hardware people are not running low enough level diagnostics, they don't know what to do, or they have drivers/firmware that has a bug and needs patching.

    Contact your IO vendor.

  • Corruption in the clustered index is likely a call to Microsoft. This is the data, and so you can't rebuild.

    If I had this, I'd try to BCP out the data from the table first, see if I could recover things. Likely the corruption is in certain pages, so if this doesn't work all at once, you may be able to find the ranges around the corruption and recover most data.

    This is serious, and if you aren't sure of what is wrong, call Microsoft.

  • Steve Jones - SSC Editor (3/12/2013)


    Corruption in the clustered index is likely a call to Microsoft. This is the data, and so you can't rebuild.

    If I had this, I'd try to BCP out the data from the table first, see if I could recover things. Likely the corruption is in certain pages, so if this doesn't work all at once, you may be able to find the ranges around the corruption and recover most data.

    This is serious, and if you aren't sure of what is wrong, call Microsoft.

    I'm dealing with nonclustered indexes at the moment. Asked the question about clustered ones as a hypothetical. Dropping the two indexes without recreating (they don't get used very much) allowed the failing SP to run. Would you recommend migrating the databases on this disk to a different drive?

Viewing 15 posts - 1 through 15 (of 21 total)

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