﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Perry Whittle  / How to Create a Corrupt SQL Server Database / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 26 May 2013 01:38:52 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>[b]mY database will be corrupted [font="Arial"][/font][/b].so how to recovery the corrupt database??????( i have little bit confusing.because of iam using below script reocvery the database :DBCC CHECKDB ('Corrupt2K8') WITH NO_INFOMSGS, ALL_ERRORMSGSexec sp_resetstatus 'Corrupt2K8'alter database Corrupt2K8 set emergencydbcc checkdb('Corrupt2K8')alter database Corrupt2K8 set single_user with rollback immediatedbcc checkdb('Corrupt2K8', REPAIR_ALLOW_DATA_LOSS)alter database Corrupt2K8 set multi_user ))NOTE: some points for consideration:Then restore My database from a backup - but make sure to run DBCC CHECKDB on that very backup to ensure it's not corrupt itself.DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS is the very last resort . Before that, you should restore a valid backup. Once you do use REPAIR_ALLOW_DATA_LOSS, don't expect your database to magically come back to life again - most likely, irreparable damage has occurred - especially in this case since it complains about system table corruption.Thank you in advance</description><pubDate>Wed, 22 Aug 2012 06:31:06 GMT</pubDate><dc:creator>Database admin(DBA)</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>hi thanks for your comments, hope you found it usefulRegards Pez</description><pubDate>Wed, 27 Jun 2012 08:21:43 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>Five stars for me as I find this type of article almost a "reverse engineering" concept, sometimes this can help with the understanding.Good stuff.[i][b]qh[/b][/i]</description><pubDate>Wed, 27 Jun 2012 06:37:16 GMT</pubDate><dc:creator>quackhandle1975</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>Thanks for your feedback, please don't forget to rate the article to.</description><pubDate>Mon, 07 May 2012 01:09:27 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>I loved this article. Very interesting to some of us who are learning the SQL Server internals and need to simulate disaster recovery.</description><pubDate>Sun, 06 May 2012 19:22:37 GMT</pubDate><dc:creator>codebyo</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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.</description><pubDate>Sun, 06 May 2012 05:38:06 GMT</pubDate><dc:creator>iBar</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>[quote][b]michael vessey (5/4/2012)[/b][hr]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[/quote]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.</description><pubDate>Fri, 04 May 2012 10:22:02 GMT</pubDate><dc:creator>jfogel</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>[quote][b]dioscoredes (5/4/2012)[/b][hr]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/ [/quote]Thank you for your feedback.For more info on in row and off row data in SQL Server see the following MS [url=http://technet.microsoft.com/en-us/library/ms189051(v=sql.105).aspx][u][b]link[/b][/u][/url][quote][b]dioscoredes (5/4/2012)[/b][hr]PS. screwed up the feedback - sorry.  Meant to be 5 stars,  Idiot![/quote]LOL grr never trust an Oracle DBA :-)</description><pubDate>Fri, 04 May 2012 06:40:03 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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</description><pubDate>Fri, 04 May 2012 05:26:49 GMT</pubDate><dc:creator>Geoff A</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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!</description><pubDate>Fri, 04 May 2012 04:00:23 GMT</pubDate><dc:creator>dioscoredes</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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.</description><pubDate>Fri, 04 May 2012 03:21:43 GMT</pubDate><dc:creator>BenWard</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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</description><pubDate>Fri, 04 May 2012 03:07:57 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item><item><title>RE: How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>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</description><pubDate>Fri, 04 May 2012 01:48:15 GMT</pubDate><dc:creator>MVDBA</dc:creator></item><item><title>How to Create a Corrupt SQL Server Database</title><link>http://www.sqlservercentral.com/Forums/Topic1295041-1452-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/CheckDB/88963/"&gt;How to Create a Corrupt SQL Server Database&lt;/A&gt;[/B]</description><pubDate>Thu, 03 May 2012 21:35:14 GMT</pubDate><dc:creator>Perry Whittle</dc:creator></item></channel></rss>