DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS

  • Can I cancel DBCC CHECKDB (cdi_commerce, REPAIR_ALLOW_DATA_LOSS) if it takes too long and what it hapend?

  • Make sure blocking do not happen 🙂

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • free_mascot (3/22/2009)


    Make sure blocking do not happen 🙂

    Since all of the CheckDB repairs require that the DB be in single user mode, there cannot be any blocking.

    yulichka: See my comments to you here - http://www.sqlservercentral.com/Forums/Topic681169-146-1.aspx

    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
  • What is your suggestion? I have web users and db needs to in multi user mode, we can't stop using this db. Thank you

  • You don't really have many options.

    If you have a clean backup and all the log backups since then, you can restore. There will be downtime though.

    You can take the DB to single user mode and repair it.

    You can ignore the error. It means all your consistency checks will fail and some queries may throw high-severity errors. (not recommended)

    I can't tell you how long it will take. Best thing to do is restore a backup somewhere else and run repair (if that's your chosen solution) and see how long it takes.

    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
  • Although, I believe the REPAIR_ALLOW_DATA_LOSS command itself take the database in the SINGLE USER mode..:-)

    -Forum Etiquette: How to post Performance Problems[/url]

    -Forum Etiquette: How to post data/code to get the best help [/url]

  • Vishal Singh (3/23/2009)


    Although, I believe the REPAIR_ALLOW_DATA_LOSS command itself take the database in the SINGLE USER mode..:-)

    It doesn't. You have to explicitly set the DB to single user mode before running it. If you try on a DB set to multiuser, checkdb returns the following error

    Msg 7919, Level 16, State 3, Line 1

    Repair statement not processed. Database needs to be in single user mode.

    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
  • Thank you, I did it today,but I had it problems to swith from sinle to multi back for about 20 minutes, why is that? Is that because users were trying to get to the system(webside? we have ecomerce databases?

Viewing 8 posts - 1 through 7 (of 7 total)

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