These errors occur during either an automatic or manual process,
such as planned maintenance or database updates. Take a snapshot of the database
before the process (and use a descriptive name for the snapshot, such as AdventureWorks_
BeforePriceUpdate_SS). If there??™s any sort of problem with the maintenance or update,
simply apply the snapshot. Once you??™re satisfied that everything is working properly,
delete the snapshot. Everyone at one time or another has done DELETE FROM TABLE and
then gone, ???Whoops, I forgot the WHERE clause.???With database snapshots, there should
be no excuse for data loss due to errors like that.
CHAPTER 9 n DATABASE SNAPSHOTS 238
Dealing with User Errors
The most difficult situation to deal with is a simple keying error. Maybe an order-entry
clerk typed in the wrong quantity or removed an entire account. Discovering those issues
and correcting them is a DBA??™s worst nightmare.
There are two ways you can use snapshots to deal with this type of situation. You can
1) create a periodic series of snapshots to restore from, or 2) use a snapshot to try to identify
what exactly has changed with the production database.
Pages:
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438