Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to Create a Corrupt SQL Server Database


How to Create a Corrupt SQL Server Database

Author
Message
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8843 Visits: 16579
Comments posted to this topic are about the item How to Create a Corrupt SQL Server Database

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
MVDBA
MVDBA
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2421 Visits: 860
nice - not sure it's got too many practical implementations other than showing a junior how to run and correct checkdb, but it's still nice to have in your arsenal

MVDBA
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8843 Visits: 16579
Hi Michael, as the article mentions it's ideal for testing DBCC scripts against and also for practising dealing with a corrupt database.

It also gives you an idea of what the data pages actually look like to

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
BenWard
BenWard
SSC-Addicted
SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)SSC-Addicted (443 reputation)

Group: General Forum Members
Points: 443 Visits: 821
Thanks - this would be a nice test for a practical interview if hiring for a DBA. Corrupt a bunch of things in advance and show the interviewee the DBCC CHECKDB results and see how many of them he/she can fix in 15 minutes.

Ben

^ Thats me!


----------------------------------------
01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
----------------------------------------
dioscoredes
dioscoredes
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 117
Really enjoyed the article. Thanks. Great demo for my advanced training labs. Have done this in Oracle several times and is interesting to see how SQL server pages map out by comparison. There are many more control fields in Oracle but the design drivers are exactly the same - how do you delploy object data into linear records in an ordinary file - and then how do you find that data. /BW/ PS. screwed up the feedback - sorry. Meant to be 5 stars, Idiot!

Men who wish to know about the world must learn about it in its particular details. - Heraclitus
Geoff A
Geoff A
SSChasing Mays
SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)SSChasing Mays (614 reputation)

Group: General Forum Members
Points: 614 Visits: 1793
this is really good stuff. thank you.

btw, this is also good for using to test a database mirror. i had to create a broken db once for testing failover. :-P
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8843 Visits: 16579
dioscoredes (5/4/2012)
Really enjoyed the article. Thanks. Great demo for my advanced training labs. Have done this in Oracle several times and is interesting to see how SQL server pages map out by comparison. There are many more control fields in Oracle but the design drivers are exactly the same - how do you delploy object data into linear records in an ordinary file - and then how do you find that data. /BW/

Thank you for your feedback.
For more info on in row and off row data in SQL Server see the following MS link



dioscoredes (5/4/2012)
PS. screwed up the feedback - sorry. Meant to be 5 stars, Idiot!

LOL grr never trust an Oracle DBA :-)

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
jfogel
jfogel
SSC-Addicted
SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)SSC-Addicted (455 reputation)

Group: General Forum Members
Points: 455 Visits: 1152
michael vessey (5/4/2012)
nice - not sure it's got too many practical implementations other than showing a junior how to run and correct checkdb, but it's still nice to have in your arsenal


Maybe but it could be taken beyond just knowing to run DBCC commands. Back around 1999-2000 I had an issue similar to this but it would cause a query to fail and disconnect the session and of course, checkdb did fix it. The real challenge came when I was tasked with a root cause analysis. I thought by fixing it I was free and could move on. Not so, my boss wanted to know the how and why it happened. So perhaps this script and information are useful in that they could be helpful in developing investigative techniques.

Cheers
iBar
iBar
Mr or Mrs. 500
Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)Mr or Mrs. 500 (588 reputation)

Group: General Forum Members
Points: 588 Visits: 840
Nice and simple. Thanks.

Usually beginners comes on forum to find solution from experts and sometimes things are not meant for experts as such. However experts correction and appreciation makes them feel part of community.

Good work.

Cheers.
Andre Guerreiro
Andre Guerreiro
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1065 Visits: 1514
I loved this article. Very interesting to some of us who are learning the SQL Server internals and need to simulate disaster recovery.

Best regards,

Andre Guerreiro Neto

Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search