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

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

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: