Database failure and recovery 1

1,737 views 13 slides Jan 27, 2022
Slide 1
Slide 1 of 13
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
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

DATA BASE


Slide Content

Database Failure and Recovery

Topics Database Failures Recovery Schemes : Shadow Paging and Log-based Recovery, Recovery wth Concurrent transactions.

Database Failures There can be a case in database system like any computer system when database failure happens. When data base fails then its difficult for users or machines to access the data from data base and if data base failure is not dealt efficiently then huge loss for organization can happen because entire business process will stop.   database failure can be defined as inability of the system to provide required functionality correctly. Database failure can be resulted due to a variety of reasons such as disk-crash, power failure, software error or even sabotage.

Classification of failure: To see wherever the failure has occurred, we tend to generalize a failure into numerous classes, as follows : Transaction failure System crash Disk failure

Classification of failure

Transaction failure:    A transaction needs to abort once it fails to execute or once it reaches to any further extent from wherever it can’t go to any extent further. This is often known as transaction failure wherever solely many transactions or processes are hurt. The reasons for transaction failure are: Logical errors System errors

Transaction failure:   Logical errors:  Where a transaction cannot complete as a result of its code error or an internal error condition. System errors:  Wherever the information system itself terminates an energetic transaction as a result of the DBMS isn’t able to execute it, or it’s to prevent due to some system condition. to Illustrate, just in case of situation or resource inconvenience, the system aborts an active transaction.

System crash: There are issues − external to the system − that will cause the system to prevent abruptly and cause the system to crash. For instance, interruptions in power supply might cause the failure of underlying hardware or software package failure. Examples might include OS errors.

Disk failure In early days of technology evolution, it had been a typical drawback wherever hard-disk drives or storage drives accustomed to failing oftentimes. Disk failures include the formation of dangerous sectors, unreachability to the disk, disk crash or the other failure, that destroys all or a section of disk storage.

Database Recovery   Database recovery  is the process of restoring the  database  to a correct (consistent) state in the event of a failure. In other words, it is the process of restoring the  database  to the most recent consistent state that existed shortly before the time of system failure.

Database Recovery The failure may be the result of a system crash due to hardware or software errors, a media failure such as head crash, or a software error in the application such as a logical error in the program that is accessing the database. Recovery restores a database form a given state, usually inconsistent, to a previously consistent state. The number of recovery techniques that are used are based on the atomicity property of transactions.

Need of Recovery The storage of data usually includes four types of media with an increasing amount of reliability: the main memory, the magnetic disk, the magnetic tape, and the optical disk. Many different forms of failure can affect database processing and/or transaction, and each of them has to be dealt with differently. Some data failures can affect the main memory only, while others involve non-volatile or secondary storage also. Among the sources of failure are: Due to hardware or software errors, the system crashes, which ultimately resulting in loss of main memory. Failures of media, such as head crashes or unreadable media that results in the loss of portions of secondary storage. There can be application software errors, such as logical errors that are accessing the database that can cause one or more transactions to abort or fail. Natural physical disasters can also occur, such as fires, floods, earthquakes, or power failures. Carelessness or unintentional destruction of data or directories by operators or users. Damage or intentional corruption or hampering of data (using malicious software or files) hardware or software facilities.

Recovery Mechnism Every DBMS should offer the following facilities to help out with the recovery mechanism: Backup mechanism  makes backup copies at a specific interval for the database. Logging facilities  keep tracing the current state of transactions and any changes made to the database. Checkpoint facility  allows updates to the database for getting the latest patches to be made permanent and keep secure from vulnerability. Recovery manager  allows the database system for restoring the database to a reliable and steady-state after any failure occurs.