Data integrity implications of running DBCC CHECKDB with repair_all option

  • Hey all,

    I am attempting to deal with the error:

    Internal Query Processor Error: The query processor encountered an unexpected error during execution.

    when I try to delete a row from a certain table in a database.Interestingly, running

    DBCC CHECKDB('DatabaseName', Repair_All)

    twice on the database permitted the delete command to run successfully.

    The first time I run the repair, there are errors. The second time, it completes successfully.

    I am concerned about running this repair with the repair_all option on the production database. I'm concerned that it could result in data loss. I attempt to look up documentation for the repair_all option, but I am having trouble finding any because of the REPAIR_ALLOW_DATA_LOSS option.

    Is Repair_All short for Repair_Allow_Data_Loss? If they are different, could running repair_all allow data loss to occur? I would appreciate any advice that anyone can provide. Thanks.

  • From some quick testing, yes, it is the equivalent to repair_allow_data_loss, as it fixes errors that only repair_allow_data_loss can fix. Hence yes, you could very well have lost data running that query (typically a page of data or more)

    Without having a checkDB output (without a repair option), there's no way to tell what you have lost.

    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

Viewing 2 posts - 1 through 1 (of 1 total)

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