I often find myself in the following situation:
- The customer reports corrupt data in his database.
- We investige the problem, sometimes by try and error.
- We try to solve the problem by using our application or one or two repair tools we ship with our product. (Only in bad cases we write a repair script for individually addressing a specific problem)
- We send a step-by-step procedure to the customer or to customer service to repair the problem.
All steps (except the first) lead to changes of the customer's database. But it is vital, especially in step 4, that everything works with the original database.
Currently we ensure that by working only with copies of it and before every test we switch back to a fresh copy. That becomes really annoying when there are one-time processes involved. (Things that can only be done once, like creating a specific invoice, processing a specific delivery, ...)
Of course that is a very slow process, especially with large databases. I've tried the backup feature, but that seems to be even slower than just copying the .mdf file.
Is there any way to quickly revert any changes made after a predefined checkpoint?