DATABASE BACKUP AND RECOVERY(2) Flashcards
____________ is a group of statements that are performed as an atomic group. It means either all the statements run successfully, or none of the do.
TRANSACTION
A transaction in progress that terminates abnormally.
ABORTED TRANSACTION
Human Error, Input of invalid data, hardware failure and deadlock
ABORTED TRANSACTION
Recovery Technique: Rollback
ABORTED TRANSACTION
INCORRECT DATA
If the error is discovered soon enough, backward recovery may be used.
INCORRECT DATA
If only a few errors have occurred, a series of compensating transaction may be introduced through human intervention to correct the errors.
INCORRECT DATA
If the first two measures are not feasible, it may be necessary to restart from the most recent checkpoint before the error occurred, and subsequent transactions processed without error.
INCORRECT DATA
DATABAE FAILURES
ABORTED TRANSACTION
INCORRECT DATA
To check for autocommit status in InnoDB, we will use the following query:
SELECT @@autocommit;
To demonstrate how to lock tables, first we will be setting autocommit = 0.
SET @@autocommit = 0;
To test Rollback:
ROLLBACK;
To manually start a transaction, we will be using Begin, or start transaction:
START TRANSACTION;
After a Transaction, if the transaction will be not having further changes, use commit.
COMMIT;