Suppose you are in charge of your company database. Explain the concrete steps you would take if there is a power-failure during the entry of daily transactions into your database. How can you assure the integrity of the database after this event?
Explanation is given below:
****************************************************
When a database fails, it must possess the facilities for fast recovery. It must also have atomicity i.e. either transactions are completed successfully and committed (the effect is recorded permanently in the database) or the transaction should have no effect on the database.
Recovery techniques are heavily dependent upon the existence of a special file known as a system log. It contains information about the start and end of each transaction and any updates which occur in the transaction. The log keeps track of all transaction operations that affect the values of database items. This information is needed to recover from transaction failure.
A transaction T reaches its commit point when all its operations that access the database have been executed successfully i.e. the transaction has reached the point at which it will not abort (terminate without completing). Once committed, the transaction is permanently recorded in the database. Commitment always involves writing a commit entry to the log and writing the log to disk. At the time of a system crash, item is searched back in the log for all transactions T that have written a start_transaction(T) entry into the log but have not written a commit(T) entry yet; these transactions may have to be rolled back to undo their effect on the database during the recovery process
Backup techniques:-
Full database backup – In this full database including data and database, Meta information needed to restore the whole database, including full-text catalogs are backed up in a predefined time series.
Differential backup – It stores only the data changes that have occurred since last full database backup.
Transaction log backup – In this, all events that have occurred in the database, like a record of every single statement executed is backed up. It is the backup of transaction log entries and contains all transaction that had happened to the database.
Integrity
Integrity is the assurance that the information being accessed has not been altered and truly represents what is intended. Integrity can be lost unintentionally, such as when a computer power surge corrupts a file or someone authorized to make a change accidentally deletes a file or enters incorrect information.
In order to ensure the confidentiality, integrity, and availability of information, organizations can choose from a variety of tools.
Under committed access, if the server crashes, Essbase rolls back all database updates by transactions that were in progress when the server stopped, ensuring that changes made by the aborted transactions are undone.
After a server interruption such as a crash, Essbase recovers a database, rolling back all transactions that were active when the interruption occurred. Recovery time depends on the index size. The larger the index, the longer it takes.
Recovery phases:
- Transaction recovery rolls back all transactions that were active when the interruption occurred.
- Index file recovery truncates files to their previously committed sizes.
- Data free space recovery rebuilds the data free space tables. The size of the index determines the duration of this phase
When Power loss on server, Essbase Server stops. When you restart the server, Essbase recovers the database.
********************************************************************************************
Thankyou !!
Get Answers For Free
Most questions answered within 1 hours.