TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
344 Chapter7
Logging and Recovery
Roll-Forward Recovery
Roll-Forward Recovery
Roll-forward recovery can be executed to bring databases back to a likeness of their state
at the time of a hard system failure (for example, a disk head crash or a system failure
while the database is enabled for AUTODEFER). Roll-forward recovery requires a
synchronized backup copy of the database and the log file. (Refer to "Logging Preparation"
earlier in this chapter for roll-forward logging information.)
When executing roll-forward recovery following a system failure, the TurboIMAGE/XL
utility DBRECOV recovers the database physical and logical integrity by re-applying (to a
backup copy of the database) all the completed transactions that were written to the log
file. It does not re-apply incomplete transactions.
Recovery of the database requires restoring the backup copy and running the recovery
system to re-execute the database modifications from the log file. In addition, the >FILE
command of the DBRECOV utility can be used to create individual user recovery files and to
return information regarding the successful recovery or suppression of transactions. The
information from these files lets each user know where to resume transactions within the
database following recovery. Refer to the discussion of the DBRECOV >FILE command in
chapter 8.
Although the logging and recovery system is designed to successfully re-execute
transactions that completed before the system failure, some transactions may not be
recovered. The possible causes of this situation include the following:
• One or more records could be lost in the log system buffers if the system fails before
they are written to the log file.
• A transaction may have originally failed to complete due to the failure, and is therefore
suppressed.
• A transaction may depend upon some database modification that was suppressed. This
condition indicates inadequate locking between processes.
• An incorrect version of the database was restored. Recovery will yield invalid and
erroneous results if this occurs.
If any transaction fails to be recovered, all subsequent calls within the same transaction
block are suppressed as well. For information about transaction blocks, refer to "FILE
Command" later in this chapter.
CAUTION
In the event of a system failure, do not restart logging before running
DBRECOV. Log records may have been lost due to the system failure. If logging
is resumed without a recovery, the resulting discontinuous log file would
cause invalid results in the event of a subsequent recovery. The same is true
for making modifications to the database. The database should be disabled for
user access until recovery has completed. To prevent access to the database
after a system failure without recovery, enable the MUSTRECOVER feature
when you enable recovery.