Corruption Challenge Solutions So Far
Lately several people have asked me for the solutions to the corruption challenge, so I thought it would be a good time to recap the… Read More »Corruption Challenge Solutions So Far
Lately several people have asked me for the solutions to the corruption challenge, so I thought it would be a good time to recap the… Read More »Corruption Challenge Solutions So Far
Hello everyone, the last week I have not been able to keep everyone as up to date on the Database Corruption Challenge as I would… Read More »Database Corruption Challange 6 – Coming Soon
Here is how I solved Week 5 of the Database Corruption Challenge. The following steps were tested and confirmed working on SQL Server 2008R2, SQL Server 2012, and SQL Server 2014.
To oversimplify, here are the steps:
Find out more about the Week 5 Challenge on the overview blog post.
The winning solution, was submitted by Patrick Flynn, just 3 hours and 18 minutes after the challenge was posted. Patrick provided me with the following steps, and TSQL code to back up the steps:
The process was
(a) Restore two copies from backup (Old backup has 400 Customers and 1622 Orders)
(b) Use the supplied MDF, LDF and NDF to hack attach to instance
(c) Try using tail-log backup but log chain broken also as errors in Boot page (1:9) unable to use all files
(d) Instead using original backup replace only log file and ndf file (containing user data)
(e) After switching to emergency mode found errors in Orders table (1:175) but this does not contain new rows
(f) Able to select the newest 181 rows and insert into original orders table
Final Status was
Orders = 12803 rows
Customers = 400 rows
No corruption remaining
Here is the exact TSQL code that supported that solution.
Read More »Week 5 – Winning Solution – Database Corruption Challenge
Today I had the opportunity to present When Corruption Strikes to the PASS DBA Virtual Chapter Meeting. This was a lot of fun to be able to… Read More »Corruption Presentation
Welcome to the Week 5 Corruption Challenge. If you have seen the t-shirt that I designed for the winner at the end of the 10… Read More »Week 5 – Corruption Challenge
There is a lot happening right now, so I thought I would put together a brief overview of upcoming speaking engagements. May 13th – When… Read More »Upcoming Speaking Engagements
On Wednesday May 13th I will be presenting to the PASS DBA Virtual Chapter Meeting, at Noon Mountain time (convert to your time zone).
The session is titled “When Database Corruption Strikes“, and the event has been sponsored by Dell Software
You are working along month after month with no problems in your database. Suddenly someone reports that their query won’t run. They get an error stating “SQL Server detected a logical consistency-based I/O error”, or something even scarier. Do you know what to do now? We will walk through 3 or 4 actual corrupt databases exploring ways to go about finding and fixing the corruption. More importantly we will explore how to prevent further data loss at the time corruption occurs. Learn what things you should do to protect yourself when corruption strikes. Learn what to avoid that will make things worse. You will leave with a checklist of steps to take when you encounter corruption. By the end of this session you will be ready to take on corruption, one database at a time.
Read More »When Corruption Strikes – Online Presentation Wed May 13th
Database Corruption Challenge #5 is coming soon. Those who subscribe to my newsletter will know the exact date and time of the next Database Corruption… Read More »Corruption Challenge #5 Coming Soon
The following is a solution to Corruption Challenge #4 that uses DBCC WritePage to fix the corruption. Before proceeding, be sure to read this warning.
WARNING: DBCC WritePage is a dangerous command, that should never be used on any production database. It may invalidate your ability to get support from Microsoft on issues that arise with that database going forward. It is not my intention to encourage anyone to use DBCC WritePage ever. This is just what I used to create a corrupt database, and since creating corrupt databases is not part of the role of most DBAs, you should not use DBCC WritePage. Consider yourself warned.
DBCC WritePage is a cool, but extremely risky way to solve this weeks Database Corruption Challenge, however, do NOT EVER RUN THIS ON A PRODUCTION SYSTEM.
Read More »Corruption Challenge 4 – Second Alternate Solution.