Database Reference
In-Depth Information
a consistent state as close to the time of failure as possible. The recovery process
must be short, fast, and easy.
First, let us explore three standard recovery methods.
Restore and reprocess. This is the simplest of the recovery methods. You take the
latest available backup tape and copy it down to the disk extent. From that point,
apply or process all the transactions up to the time of failure. Let us say that you
create backup tapes every night at 11 P . M . Suppose a failure occurred around 3 P . M .
today. You take last night's backup and use it to recreate your database. Then you
redo all on-line and batch transactions that executed between 11 P . M . last night up
to 3 P . M . today. Although simple and straightforward, this method is not usually
acceptable. The time and effort to reprocess all the transactions from the time of
the latest backup may be too great. Next, to bring the database to the exact state it
was before the crash, you need to reprocess the transactions in the same order they
were processed before.
Backward recovery or rollback. In this case, the latest backup tape and the log file
are used for recovery. As pointed out in the previous method, the backup tape
created last night at 11 P . M . is first used to create the database as it was at that time.
Then the recovery manager of the DBMS runs to process the transactions from the
log file. All completed transactions found in the log file are applied to the database
created by copying the backup file. For transactions in flight or incomplete because
of the failure, the before images of data items are applied. All the incomplete trans-
actions must be sorted out and reprocessed.
Forward recovery or rollforward. This is similar to rollback except that, wherever
possible, incomplete transactions are completed from the available after images of
data items found on the log file. The database is first recreated from the backup file,
and then the completed transactions from the log file are applied to the database.
The database is then brought forward with any available after images in the log file
for the in-flight transactions.
Figure 17-3 shows these three recovery methods. Note the use of the backup and
log files in each case.
Applicability to Failure Types When do you apply these recovery modes? Are
there any circumstances under which restore and reprocess method can apply?
When is forward recovery more appropriate?
Figure 17-4 lists the types of failures and also suggests the recovery method suit-
able for each type.
Security Maintenance
In Chapter 16 on database security, you studied the significant techniques relating
to protecting the database system. As you know, discretionary access controls deal
with granting and revoking access privileges to individual users and user groups.
Mandatory access control is more stringent, with security classes for database
objects and security clearances for users. Here we want to list the types of activities
that must be routinely performed as part of the ongoing maintenance.
Search WWH ::




Custom Search