How can I demonstrate what DBCC CheckDB will show if corruption is found?

  • I'm looking to give a demonstration / training for some of my co-workers on some basic troubleshooting of DB problems. Things that they can run, without risking client data, or that can potentially improve the overall performance of SQL (NOT complex things like query tuning!)

    What I'd like to do, is demonstrate what DBCC CHECKDB will show if it finds corruption in the database. Obviously, to do this, I first need a broken database, which is where I have a problem. How can I "break" a database to demonstrate this? I will create a sample DB of my own, something relatively small to use for this.

    If I need something like a hex editor to do this, could you point me at one you prefer?

    Thanks,

    Jason A.

  • Or I could have searched on Google for "sql server create corrupt database" in which case the top two results would be an article by Perry Whittle (How To Create a Corrupt SQL Server Database for Test Purposes) and an article right here also from Perry... (How to Create a Corrupt SQL Server Database[/url])

    Sorry about the lack of LMGTFY on my part, it's been a long day...

    Jason A.

  • Or just download Paul Randal's pre-corrupted databases

    http://www.sqlskills.com/blogs/paul/post/Sample-corrupt-databases-to-play-with.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
  • Thanks, I missed those!

    Jason

  • jasona.work (10/30/2012)


    Or I could have searched on Google for "sql server create corrupt database" in which case the top two results would be an article by Perry Whittle (How To Create a Corrupt SQL Server Database for Test Purposes) and an article right here also from Perry... (How to Create a Corrupt SQL Server Database[/url])

    Sorry about the lack of LMGTFY on my part, it's been a long day...

    Jason A.

    its ok we all have long days every now and then. i thank you for posting the links. i was about to head down the road my self.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

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

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