Database Reference
In-Depth Information
ROUTINE MAINTENANCE
Just like a mechanical system or any other type of system, to keep the database
system working, the database administrator must perform routine maintenance
functions. These are not for addressing major problems or recovery from failures.
On a day-to-day basis, routine maintenance functions ensure that the components
are working well. Routine maintenance functions keep the database performing at
the current level without coming to a halt. Let us consider a few key routine main-
tenance activities.
Backup and Recovery
It does not matter to what extent a database system is safeguarded, in practice
failures do occur and they destroy the system partially or completely. Whatever may
be the cause of the failure—fire, unintentional or intentional action by people, power
failure, or mechanical malfunctions of hardware devices—the DBA must plan and
provide for a method to recover and restore the database to a consistent state.
Backing up the database at frequent intervals is obviously an effective, straight-
forward technique to help in the recovery process. As you know, backup files alone
cannot restore the database to the current state if a failure occurs much later than
when the latest backup was taken. You know that other files such as the transaction
log file are also necessary to bring the database to its most current state.
Recovery System A complete recovery system consists of the following func-
tions and components:
Backup capability. Create backup copies of the entire database at specified inter-
vals. Most database installations create backups at least once a day, usually after the
nightly batch update jobs are completed.
Backup files are kept on tape cartridges or optical media other than the disk
medium on which databases usually reside. It is customary to keep at least three
generations of the backup files, just in case the latest backup file cannot be read
during the recovery process. Also, it is advisable to store backup files at an off-site
location.
Journalizing capability. Create log files containing details of all transactions since
the last full backup of the database. As discussed in a previous chapter, log file
records contain before and after images of the database objects that were accessed
by individual transactions. The records also keep the timestamp and disposition of
each transaction.
Checkpoint capability. Create checkpoint records on the log file to speed up the
recovery process. While recovering, the recovery manager module may need to go
back only up to the most recent checkpoint record.
Recovery capability. The DBMS should provide a recovery manager module to
restore the database to the most recent possible state from the backup and log files.
Figure 17-2 presents the components of the database recovery system.
Search WWH ::




Custom Search