Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 1997 UW CSE 11/24/97O-1 Recovery Concepts Chapter 18 (lightly)

Similar presentations


Presentation on theme: "© 1997 UW CSE 11/24/97O-1 Recovery Concepts Chapter 18 (lightly)"— Presentation transcript:

1 © 1997 UW CSE 11/24/97O-1 Recovery Concepts Chapter 18 (lightly)

2 11/24/97O-2 Need for Recovery Non-catastrophic: need Log only –Transaction abort –Normal part of many concurrency schemes Catastrophic: need Log + Backup –Physical loss of disks –Pervasive application error –System software error (corrupted filesystem, buffer management errors, etc.) –Virus, sabotage, etc.

3 11/24/97O-3 (Review) The Log File Contains: Transaction starts/stops DB writes: "before" and "after" images –befores can be used to rollback an aborted transaction –afters can be used to redo a transaction without reexecuting it COMMITs and ABORTs The log itself is as critical as the DB! Reliable backups are critical, too!

4 11/24/97O-4 Strategies Which Anticipate Normal Recovery Deferred update –Writes are not actually applied to DB until after T commits. –No UNDO is needed. –Implementation: buffers, shadow page table, etc. Immediate update –Writes are actually applied as T executes –Aborted transactions: UNDO (rollback)

5 11/24/97O-5 Catastrophe First restore from a full backup Rollforward from log –REDO all committed transactions Apply all logged WRITEs –Could actually REDO changes in reverse chrono order: i.e., only apply latest change –T's interrupted by the catastrophe must be restarted or user notified

6 11/24/97O-6 Disaster Recovery via Redundancy A reliable duplicate copy could be used for "instant" recovery –copy could be "hot" (in use by applications) or only on standby SW-based –managed by DBMS or OS –could be part of a distributed system HW-based –RAID: Redundant Array of Inexpensive Disks


Download ppt "© 1997 UW CSE 11/24/97O-1 Recovery Concepts Chapter 18 (lightly)"

Similar presentations


Ads by Google