DBCC CHECKDB WITH ALLOW_DATA_LOSS

  • Can you provide me an example of it please.Thank you

  • From BOL:

    DBCC CHECKDB

    [

    [ ( database_name | database_id | 0

    [ , NOINDEX

    | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]

    ) ]

    [ WITH

    {

    [ ALL_ERRORMSGS ]

    [ , EXTENDED_LOGICAL_CHECKS ]

    [ , NO_INFOMSGS ]

    [ , TABLOCK ]

    [ , ESTIMATEONLY ]

    [ , { PHYSICAL_ONLY | DATA_PURITY } ]

    }

    ]

    ]

    Possible Example:

    DBCC CHECKDB (DatabaseName,REPAIR_ALLOW_DATA_LOSS)

    Thanks.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • Do I need to add REPAIR_FAST or REPAIR_REBUILD and what is the difference?

  • Before you run it (though looking at all your other posts, it may be a little late) note that REPAIR_ALLOW_DATA_LOSS should be a last resort for fixing corruption. As it's name implies, it causes data loss.

    If you have a clean backup, you should restore from that. Only if you don't have a clean backup should you be considering repair.

    Take a look at this article. http://www.sqlservercentral.com/articles/65804/

    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 4 posts - 1 through 4 (of 4 total)

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