SlideShare a Scribd company logo
1 of 5
2. Recovery
♦ Introduction
▪ System failures, either hardware or software, must not result in an
inconsistent database. If an error or hardware/software crash
occurs between the begin and end, the database will be inconsistent.
- The database is restored to some state from the past so that a
correct state—close to the time of failure—can be reconstructed
from the past state.
▪ A DBMS ensures that if a transaction executes some updates and then
a failure occurs before the transaction reaches normal termination,
then those updates are undone.
2. Recovery
♦ Introduction
▪ The statements commit and rollback (or their equivalent) ensure
transaction atomicity.
☺Mirroring:
Keep two copies of the database and maintain them
Simultaneously.
☺ Backup:
Periodically dump the complete state of the database to some form
of tertiary storage.

☺ System logging:
The log keeps track of all transaction operations affecting the
values of database items. The log is kept on disk so that it is not
affected by failures except for disk and catastrophic failures.
2. Recovery
♦ Recovery from Transaction Failures
▪ Catastrophic failure:
. Restore a previous copy of the database from archival backup.
. Apply transaction log to copy to reconstruct more current state by
redoing committed transaction operations up to failure point.
. Incremental dump + log each transaction.
▪ Non-catastrophic failure:
. Reverse the changes that caused the inconsistency by undoing the
operations and possibly redoing legitimate changes which were lost.
. The entries kept in the system log are consulted during recovery.
. No need to use the complete archival copy of the database.
2. Recovery
♦ Why Recovery is needed?
▪ Whenever a transaction is submitted to a DBMS for execution,
the system is responsible for making sure that either,
(1) all the operations in the transaction are completed successfully
and their effect is recorded permanently in the database.
(2) or the transaction has no effect whatsoever on the database or
on any other transactions.
▪ The DBMS must not permit some operations of a transaction t to be
applied to the database while other operations of t are not.
-- This may happen if a transaction fails after executing some of its
operations but before executing all of them.
2. Recovery
♦ Types of failures
Generally classified as transaction, system, and media failures.
♪. A computer failure (system crash):
♪. A transaction or system error:
♪. Local errors or exception conditions detected by the transaction:
♪. Concurrency control enforcement:
♪. Disk failure:
♪. Physical problems and catastrophes:

More Related Content

What's hot

Operating System
Operating SystemOperating System
Operating SystemGowriLatha1
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Peter R. Egli
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingJafar Nesargi
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating systemChetan Mahawar
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptxSanad Bhowmik
 
Concurrent process
Concurrent processConcurrent process
Concurrent processYogendra Rwl
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryZainab Almugbel
 
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And GagneSlides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And Gagnesarankumar4445
 

What's hot (20)

Homework solution1
Homework solution1Homework solution1
Homework solution1
 
Data (1)
Data (1)Data (1)
Data (1)
 
Transaction Processing monitor
Transaction Processing monitorTransaction Processing monitor
Transaction Processing monitor
 
Operating System
Operating SystemOperating System
Operating System
 
Process concept
Process conceptProcess concept
Process concept
 
Operating System
Operating SystemOperating System
Operating System
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
OS_Ch4
OS_Ch4OS_Ch4
OS_Ch4
 
Chapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processingChapter 9 introduction to transaction processing
Chapter 9 introduction to transaction processing
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 
Real time systems 1 and 2
Real time systems 1 and 2Real time systems 1 and 2
Real time systems 1 and 2
 
Concurrent process
Concurrent processConcurrent process
Concurrent process
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And GagneSlides For Operating System Concepts By Silberschatz Galvin And Gagne
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Chapter17
Chapter17Chapter17
Chapter17
 

Similar to 2 recovery

database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfKavitaShinde26
 
Transactionsmanagement
TransactionsmanagementTransactionsmanagement
TransactionsmanagementSanjeev Gupta
 
ch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptAdemeCheklie
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and RecoveryDamian T. Gordon
 
Adbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryAdbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryVaibhav Khanna
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Yaksh Jethva
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319ARVIND SARDAR
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and RecoveryMaham Huda
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxKoteswari Kasireddy
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and propertiesChetan Mahawar
 

Similar to 2 recovery (20)

DBMS Vardhaman.pdf
DBMS Vardhaman.pdfDBMS Vardhaman.pdf
DBMS Vardhaman.pdf
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdf
 
Transactionsmanagement
TransactionsmanagementTransactionsmanagement
Transactionsmanagement
 
ch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.ppt
 
Databases: Backup and Recovery
Databases: Backup and RecoveryDatabases: Backup and Recovery
Databases: Backup and Recovery
 
Dbms
DbmsDbms
Dbms
 
DBMS unit-5.pdf
DBMS unit-5.pdfDBMS unit-5.pdf
DBMS unit-5.pdf
 
ch-5 advanced db.pdf
ch-5 advanced db.pdfch-5 advanced db.pdf
ch-5 advanced db.pdf
 
Adbms 34 transaction processing and recovery
Adbms 34 transaction processing and recoveryAdbms 34 transaction processing and recovery
Adbms 34 transaction processing and recovery
 
Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)Transaction Properties(ACID Properties)
Transaction Properties(ACID Properties)
 
Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319Unit no 5 transation processing DMS 22319
Unit no 5 transation processing DMS 22319
 
Backing Up and Recovery
Backing Up and RecoveryBacking Up and Recovery
Backing Up and Recovery
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
 
Recovery techniques
Recovery techniquesRecovery techniques
Recovery techniques
 
Chapter19
Chapter19Chapter19
Chapter19
 
DBMS 4.pdf
DBMS 4.pdfDBMS 4.pdf
DBMS 4.pdf
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
 
DBMS UNIT IV.pptx
DBMS UNIT IV.pptxDBMS UNIT IV.pptx
DBMS UNIT IV.pptx
 
Db lec 07_new
Db lec 07_newDb lec 07_new
Db lec 07_new
 

More from Mr Patrick NIYISHAKA (20)

Summary
SummarySummary
Summary
 
3 summary
3 summary3 summary
3 summary
 
2 ddb architecture
2 ddb architecture2 ddb architecture
2 ddb architecture
 
1 ddb
1 ddb1 ddb
1 ddb
 
2 countermeasures
2 countermeasures2 countermeasures
2 countermeasures
 
2 countermeasures
2 countermeasures2 countermeasures
2 countermeasures
 
3 summary
3 summary3 summary
3 summary
 
1 db security
1 db security1 db security
1 db security
 
4 summary
4 summary4 summary
4 summary
 
3 summary
3 summary3 summary
3 summary
 
2 con control
2 con control2 con control
2 con control
 
1 con exe
1 con exe1 con exe
1 con exe
 
1 basic concepts
1 basic concepts1 basic concepts
1 basic concepts
 
3 transaction
3 transaction3 transaction
3 transaction
 
3 summary
3 summary3 summary
3 summary
 
1 query processing
1 query processing1 query processing
1 query processing
 
1 query processing
1 query processing1 query processing
1 query processing
 
2 optimization
2 optimization2 optimization
2 optimization
 
2 collision
2 collision2 collision
2 collision
 
4 summary
4 summary4 summary
4 summary
 

Recently uploaded

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Recently uploaded (20)

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

2 recovery

  • 1. 2. Recovery ♦ Introduction ▪ System failures, either hardware or software, must not result in an inconsistent database. If an error or hardware/software crash occurs between the begin and end, the database will be inconsistent. - The database is restored to some state from the past so that a correct state—close to the time of failure—can be reconstructed from the past state. ▪ A DBMS ensures that if a transaction executes some updates and then a failure occurs before the transaction reaches normal termination, then those updates are undone.
  • 2. 2. Recovery ♦ Introduction ▪ The statements commit and rollback (or their equivalent) ensure transaction atomicity. ☺Mirroring: Keep two copies of the database and maintain them Simultaneously. ☺ Backup: Periodically dump the complete state of the database to some form of tertiary storage. ☺ System logging: The log keeps track of all transaction operations affecting the values of database items. The log is kept on disk so that it is not affected by failures except for disk and catastrophic failures.
  • 3. 2. Recovery ♦ Recovery from Transaction Failures ▪ Catastrophic failure: . Restore a previous copy of the database from archival backup. . Apply transaction log to copy to reconstruct more current state by redoing committed transaction operations up to failure point. . Incremental dump + log each transaction. ▪ Non-catastrophic failure: . Reverse the changes that caused the inconsistency by undoing the operations and possibly redoing legitimate changes which were lost. . The entries kept in the system log are consulted during recovery. . No need to use the complete archival copy of the database.
  • 4. 2. Recovery ♦ Why Recovery is needed? ▪ Whenever a transaction is submitted to a DBMS for execution, the system is responsible for making sure that either, (1) all the operations in the transaction are completed successfully and their effect is recorded permanently in the database. (2) or the transaction has no effect whatsoever on the database or on any other transactions. ▪ The DBMS must not permit some operations of a transaction t to be applied to the database while other operations of t are not. -- This may happen if a transaction fails after executing some of its operations but before executing all of them.
  • 5. 2. Recovery ♦ Types of failures Generally classified as transaction, system, and media failures. ♪. A computer failure (system crash): ♪. A transaction or system error: ♪. Local errors or exception conditions detected by the transaction: ♪. Concurrency control enforcement: ♪. Disk failure: ♪. Physical problems and catastrophes: