SlideShare a Scribd company logo
1 of 15
DATA
RECOVERY
INTRODUCTION
• Data is non-recoverable in case of media failure, intentional attack on the database
and transactions logging data, or physical media destruction.
• In computing, data recovery is a process of salvaging (retrieving) inaccessible, lost,
corrupted, damaged or formatted data from secondary storage, removable media or
files, when the data stored in them cannot be accessed in a normal way.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
RECOVERY MANAGEMENT
ARCHITECTURE
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
Update Operation
Database Buffer
Database Manager
Recovery Manager
Secondary Memory
Log fileTransaction command
Starting stable and final
stable database
Commands for
flush and fetch
Recovery Management Architecture (RMA)
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
MAJOR COMPONENTS OF RMA
• Recovery Manager
• Secondary Memory
• Transaction Commands
• Database buffer Manager
• Database buffer
• Log file for Secondary Memory
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
Atomicity
• Uncommitted but data started transaction aborts
on failure and aborted transactions are logged in
log file.
Durability
• Committed transactions are not affected by failure
and can be recovered easily.
Recover
y
Manage
r
Ensures
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
SECONDARY MEMORY
• It is also known as Hard Disk or the auxiliary memory.
• Stable state of the databases at the start and at the end of transactions reside in
secondary storage.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
TRANSACTION COMMANDS TO
RECOVERY MANAGER
• All the transaction commands
are sent to the recovery
manager.
• Major transaction commands
are given in the chart.
• The recovery manager then
sends fetch commands to the
database manager.
Commit
• This command is used to permanently save any transaction into the
database.
Rollback
• This command restores the database to last commited state. It is also used
with command to jump to a savepoint in an ongoing transaction.
Savepoint
• This command is used to temporarily save a transaction so that you can
rollback to that point whenever required.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
DATABASE & RECOVERY MANAGER
• The database manager processes the queries during the transaction and uses a
database buffer.
• The recovery manager also sends the flush commands to transfer the committed
transactions and database buffer data to the secondary storage.
• The recovery manager detects the results of operations.
• It recovers lost operations from the secondary storage.
• Recovery is by detecting the data lost during the transaction.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
LOG FILE USED BY RECOVERY
MANAGER
• The recovery manager uses a log file, which logs actions in the following manner:
– Each instruction for a transaction for update (insertion, deletion, replacement, and addition)
must be logged.
– Database read instructions are not logged.
– Log files are stored at a different storage mediums.
– Log entries are flushed out after the final stable state database is stored.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
• Each logged entry contains the following fields:
– transaction type (begin, commit, or rollback transaction)
– transaction ID
– operation-type
– object on which the operation is performed
– pre-operation and post-operation values of the object.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
ARIES ALGORITHM
• A procedure called the ARIES algorithm is also used for recovering lost data.
• Here 2 two data structures have to be maintained:
– the dirty page table (DPT)
– the transaction table (TT).
• The dirty page table keeps record of all the pages that have been modified and not yet
written back to disc and the first Sequence Number that caused that page to become
dirty.
• The transaction table contains all transactions that are currently running and the
Sequence Number of the last log entry they caused.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
• The basic steps of the algorithm are as follows:
– Analyse from last checkpoint and identify all dirty records (written again after operation
restarted) in the buffer.
– Redo all buffered operations logged in the update log to finish and make final page.
– Undo all write operations and restore pre-transaction values.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
DATA RECOVERY MODELS
• The recovery models used in data recovery processes are as follows:
– The full recovery model creates back up of the database and incremental backup of the
changes. All transactions are logged from the last backup taken for the database.
– The bulk logged recovery model entails logging and taking backup of bulk data record
operations but not the full logging and backup. Size of bulk logging is kept to the minimum
required. This improves performance. We can recover the database to the point of failure by
restoring the database with the bulk transaction log file backup. This is unlike the full
recovery model in which all operations are logged.
– The simple recovery model prepares full backups but the incremental changes are not
logged. We can recover the database to the most recent backup of the given database.
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat
THANK YOU
S H U B H A M I N D R AWAT
shubhamindrawat@gmail.com
www.linkedin.com/in/shubhamindrawat

More Related Content

Similar to Data recovery

Backup & Recovery
Backup & RecoveryBackup & Recovery
Backup & RecoveryAbhay Kumar
 
Oracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsOracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsVigilant Technologies
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recoveryacap paei
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...Raj vardhan
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfKavitaShinde26
 
Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)welcometofacebook
 
515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptxssuser03ec3c
 
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System ConfigurationSolution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System ConfigurationLinh Nguyen
 
ch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptAdemeCheklie
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency controlDhani Ahmad
 
Super Mart Report.docx
Super Mart Report.docxSuper Mart Report.docx
Super Mart Report.docxSameerUsmani3
 
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...Lucas Jellema
 
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
 

Similar to Data recovery (20)

Crash recovery in database
Crash recovery in databaseCrash recovery in database
Crash recovery in database
 
Backup & Recovery
Backup & RecoveryBackup & Recovery
Backup & Recovery
 
Oracle EBS Production Support - Recommendations
Oracle EBS Production Support - RecommendationsOracle EBS Production Support - Recommendations
Oracle EBS Production Support - Recommendations
 
DBMS Vardhaman.pdf
DBMS Vardhaman.pdfDBMS Vardhaman.pdf
DBMS Vardhaman.pdf
 
Topic 4 database recovery
Topic 4 database recoveryTopic 4 database recovery
Topic 4 database recovery
 
What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...What is Database Backup? The 3 Important Recovery Techniques from transaction...
What is Database Backup? The 3 Important Recovery Techniques from transaction...
 
UNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdfUNIT 4- CRASH AND RECOVERY.pdf
UNIT 4- CRASH AND RECOVERY.pdf
 
Data and database administration(database)
Data and database administration(database)Data and database administration(database)
Data and database administration(database)
 
our srs (1).pdf
our srs (1).pdfour srs (1).pdf
our srs (1).pdf
 
515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx515689311-Postgresql-DBA-Architecture.pptx
515689311-Postgresql-DBA-Architecture.pptx
 
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System ConfigurationSolution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
Solution Manager 7.2 SAP Monitoring - Part 3 - Managed System Configuration
 
ch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.pptch 5 Daatabase Recovery.ppt
ch 5 Daatabase Recovery.ppt
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
AutoDOPandRest
AutoDOPandRestAutoDOPandRest
AutoDOPandRest
 
Super Mart Report.docx
Super Mart Report.docxSuper Mart Report.docx
Super Mart Report.docx
 
2 recovery
2 recovery2 recovery
2 recovery
 
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
Time is of the essence - The Fourth Dimension in Oracle Database 12c (on Flas...
 
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
 
Database Abstraction Layer and Transaction in Stored procedures
Database Abstraction Layer and Transaction in Stored proceduresDatabase Abstraction Layer and Transaction in Stored procedures
Database Abstraction Layer and Transaction in Stored procedures
 
DALmodule and sp transaction
DALmodule and sp transactionDALmodule and sp transaction
DALmodule and sp transaction
 

Recently uploaded

B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 

Recently uploaded (20)

B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Dwarka Sector 15 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 

Data recovery

  • 2. INTRODUCTION • Data is non-recoverable in case of media failure, intentional attack on the database and transactions logging data, or physical media destruction. • In computing, data recovery is a process of salvaging (retrieving) inaccessible, lost, corrupted, damaged or formatted data from secondary storage, removable media or files, when the data stored in them cannot be accessed in a normal way. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 4. Update Operation Database Buffer Database Manager Recovery Manager Secondary Memory Log fileTransaction command Starting stable and final stable database Commands for flush and fetch Recovery Management Architecture (RMA) shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 5. MAJOR COMPONENTS OF RMA • Recovery Manager • Secondary Memory • Transaction Commands • Database buffer Manager • Database buffer • Log file for Secondary Memory shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 6. Atomicity • Uncommitted but data started transaction aborts on failure and aborted transactions are logged in log file. Durability • Committed transactions are not affected by failure and can be recovered easily. Recover y Manage r Ensures shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 7. SECONDARY MEMORY • It is also known as Hard Disk or the auxiliary memory. • Stable state of the databases at the start and at the end of transactions reside in secondary storage. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 8. TRANSACTION COMMANDS TO RECOVERY MANAGER • All the transaction commands are sent to the recovery manager. • Major transaction commands are given in the chart. • The recovery manager then sends fetch commands to the database manager. Commit • This command is used to permanently save any transaction into the database. Rollback • This command restores the database to last commited state. It is also used with command to jump to a savepoint in an ongoing transaction. Savepoint • This command is used to temporarily save a transaction so that you can rollback to that point whenever required. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 9. DATABASE & RECOVERY MANAGER • The database manager processes the queries during the transaction and uses a database buffer. • The recovery manager also sends the flush commands to transfer the committed transactions and database buffer data to the secondary storage. • The recovery manager detects the results of operations. • It recovers lost operations from the secondary storage. • Recovery is by detecting the data lost during the transaction. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 10. LOG FILE USED BY RECOVERY MANAGER • The recovery manager uses a log file, which logs actions in the following manner: – Each instruction for a transaction for update (insertion, deletion, replacement, and addition) must be logged. – Database read instructions are not logged. – Log files are stored at a different storage mediums. – Log entries are flushed out after the final stable state database is stored. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 11. • Each logged entry contains the following fields: – transaction type (begin, commit, or rollback transaction) – transaction ID – operation-type – object on which the operation is performed – pre-operation and post-operation values of the object. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 12. ARIES ALGORITHM • A procedure called the ARIES algorithm is also used for recovering lost data. • Here 2 two data structures have to be maintained: – the dirty page table (DPT) – the transaction table (TT). • The dirty page table keeps record of all the pages that have been modified and not yet written back to disc and the first Sequence Number that caused that page to become dirty. • The transaction table contains all transactions that are currently running and the Sequence Number of the last log entry they caused. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 13. • The basic steps of the algorithm are as follows: – Analyse from last checkpoint and identify all dirty records (written again after operation restarted) in the buffer. – Redo all buffered operations logged in the update log to finish and make final page. – Undo all write operations and restore pre-transaction values. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 14. DATA RECOVERY MODELS • The recovery models used in data recovery processes are as follows: – The full recovery model creates back up of the database and incremental backup of the changes. All transactions are logged from the last backup taken for the database. – The bulk logged recovery model entails logging and taking backup of bulk data record operations but not the full logging and backup. Size of bulk logging is kept to the minimum required. This improves performance. We can recover the database to the point of failure by restoring the database with the bulk transaction log file backup. This is unlike the full recovery model in which all operations are logged. – The simple recovery model prepares full backups but the incremental changes are not logged. We can recover the database to the most recent backup of the given database. shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat
  • 15. THANK YOU S H U B H A M I N D R AWAT shubhamindrawat@gmail.com www.linkedin.com/in/shubhamindrawat

Editor's Notes

  1. ARIES - Algorithms for Recovery and Isolation Exploiting Semantics