Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

How to Create a Corrupt SQL Server Database Expand / Collapse
Author
Message
Posted Thursday, May 3, 2012 9:35 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 6,166, Visits: 13,309
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"
Post #1295041
Posted Friday, May 4, 2012 1:48 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, June 26, 2014 8:49 AM
Points: 2,276, Visits: 779
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
Post #1295080
Posted Friday, May 4, 2012 3:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 6,166, Visits: 13,309
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"
Post #1295097
Posted Friday, May 4, 2012 3:21 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, June 13, 2014 7:51 AM
Points: 367, Visits: 634
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
----------------------------------------
Post #1295100
Posted Friday, May 4, 2012 4:00 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, September 18, 2012 4:58 AM
Points: 27, Visits: 116
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
Post #1295116
Posted Friday, May 4, 2012 5:26 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 12:24 PM
Points: 514, Visits: 1,717
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.
Post #1295141
Posted Friday, May 4, 2012 6:40 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 6:34 AM
Points: 6,166, Visits: 13,309
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"
Post #1295176
Posted Friday, May 4, 2012 10:22 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 7:43 AM
Points: 370, Visits: 954
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
Post #1295387
Posted Sunday, May 6, 2012 5:38 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, June 17, 2014 6:22 AM
Points: 574, Visits: 800
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.
Post #1295654
Posted Sunday, May 6, 2012 7:22 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, June 26, 2014 5:34 AM
Points: 897, Visits: 1,486
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
Post #1295755
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse