Database recovery

vrittimalhotra28 14,579 views 9 slides Oct 13, 2014
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

Topic: Database Recovery


Slide Content

Database Recovery

Database recovery is the process of restoring the database to the most recent consistent state that existed just before the failure . Data recovery is important in managing a database system. Having a good plan will help make a quick and successful recovery from a failure. Database Recovery

Purpose : To bring the database into the last consistent state, which existed prior to the failure. To preserve transaction (ACID) properties: Atomicity Consistency Isolation Durability Purpose Of Database Recovery

A failure is a state where data inconsistency is visible to transactions if they are scheduled for execution. In databases usually three types of failure are encountered: Transaction failure System failure Media failure Database Failure

Database server computer or program crashes Database client computer or program crashes Network failure between client and server Data on a disk drive is corrupted A transaction executes an illegal operation Two or more transactions deadlock Transactions introduce errors into the Database What Causes Database Failure?

Recovery Strategies Types of Transaction updates Deferred update List of all changes in the order they were committed ‘ recovery and roll forward’ Shadow update List of all changes in reverse order ‘roll back’ Often more efficient than recovery and roll forward

Immediate Update As soon as the data is updated , the disk copy is also updated. In place Update The disk version of data is overwritten by the cache version. Recovery Strategies

A deadlock is a situation in which two or more competing actions are each waiting for the other to finish, and thus neither ever does. A deadlock situation can arise if all of the following conditions hold simultaneously in a system: Mutual Exclusion: Hold and Wait  No   Preemption Circular Wait : Deadlock

Most current operating systems cannot prevent a deadlock from occurring When a deadlock occurs, different operating systems respond to them in different non-standard manners . Major approaches are as follows. Ignoring deadlock Detection and Recovery Prevention and Avoidance Deadlock handling & Recovery
Tags