Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Data Corruption
»
CORRUPT A DATABASE
CORRUPT A DATABASE
Rate Topic
Display Mode
Topic Options
Author
Message
kerusy
kerusy
Posted Wednesday, January 21, 2009 6:23 AM
SSC Rookie
Group: General Forum Members
Last Login: Thursday, April 02, 2009 8:55 AM
Points: 33,
Visits: 139
Hello guyz! Am doing some research on database repair, and i need to have a corrupt database, inorder for me to use the DBCC commands and verify their working. Any help on this please?
Post #640629
steveb.
steveb.
Posted Wednesday, January 21, 2009 6:26 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 10:07 AM
Points: 2,802,
Visits: 7,107
there are databases linked here that are in various stages on corruption.
http://sqlskills.com/BLOGS/PAUL/category/Corruption.aspx
Post #640634
CrazyMan
CrazyMan
Posted Wednesday, January 21, 2009 6:27 AM
Right there with Babe
Group: General Forum Members
Last Login: Tuesday, September 18, 2012 3:00 PM
Points: 770,
Visits: 1,593
Interesting Question, Search Google, to start with play with sys tables, this should do the trick :D, make sure that you do this in a test environment or may be better on your local machine
Post #640637
GilaMonster
GilaMonster
Posted Wednesday, January 21, 2009 6:33 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 4:11 PM
Points: 37,741,
Visits: 30,020
Disclaimer: Do not do this on a production server. Do not do this to any database that you care about. If you want to play, do so on a SQL instance installed on your workstation.
Right, now that's out of the way...
Take the database offline, open the mdf file in a hex editor. Go to an offset 40k or so into the file (to avoid the critical header pages) and then 0 out a block of data. Save the file, close it, go back to SQL and attempt to bring the database online
I say attempt, because last time I tried that, I fried the DB so badly that SQL couldn't bring it back online.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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
Post #640647
Paul Randal
Paul Randal
Posted Wednesday, January 21, 2009 4:54 PM
SSCommitted
Group: General Forum Members
Last Login: Yesterday @ 4:00 PM
Points: 1,910,
Visits: 1,602
See
http://www.sqlskills.com/BLOGS/PAUL/post/Conference-corruption-demo-scripts-and-example-corrupt-databases.aspx
for a bunch of pre-corrupted databases.
Also see
http://www.sqlskills.com/BLOGS/PAUL/post/Example-20002005-corrupt-databases-and-some-more-info-on-backup-restore-page-checksums-and-IO-errors.aspx
Paul Randal
CEO,
SQLskills.com
:
Check out SQLskills online training!
Blog:
www.SQLskills.com/blogs/paul
Twitter:
@PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of
TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #641258
Jeff Moden
Jeff Moden
Posted Wednesday, January 21, 2009 7:55 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 4:51 PM
Points: 32,923,
Visits: 26,811
Heh... just tell it to run for office. :P
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #641333
The_SQL_DBA
The_SQL_DBA
Posted Thursday, January 22, 2009 2:16 PM
Right there with Babe
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 3:23 AM
Points: 794,
Visits: 901
If you wanna corrupt it time and again after you try repairing then
backup the clean database
before you start corrupting it..
Thanks!!
The_SQL_DBA
MCTS
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
Post #642074
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.