TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
366 Chapter7
Logging and Recovery
The Mirror Database
Maintaining the Mirror Database
After the mirror database system is set up, the DBRECOV STOP-RESTART feature is used
to maintain the secondary database. To start the initial DBRECOV procedure, the user must
make sure logging is enabled on the primary system and that either the MPE/iX GETLOG
AUTO option or CHANGELOG is being used. These MPE/iX options make logging without
interruption on the primary system possible, thus increasing the availability of the
databases. For more information on logging options refer to "Logging Preparation" and
"Logging Maintenance" earlier in this chapter. Appendix G provides a brief outline of
logging to disk and logging to tape.
After the log files are transferred to the secondary system (the mirror database system),
they are applied to the mirror database using the DBRECOV roll-forward recovery process.
The STOP-RESTART feature of DBRECOV is the key to making the mirror database system
a workable maintenance method; for a detailed discussion of this feature, refer to the next
section entitled "Performing DBRECOV STOP-RESTART." This feature adds the capability
to CON[TINUE] or STOP the recovery process on the secondary system if DBRECOV cannot
find the next log file in the log set. Whenever DBRECOV cannot find the next log file in a log
set, the recovery process on the secondary system can be stopped, the databases can be
backed up, and recovery can then be restarted from the point it was stopped. The primary
system never has to be brought down for backups.
DBRECOV applies the chained log files starting with the first log file created when logging
was enabled. It continues to process each log file in the log set consecutively until it cannot
find the next log file in the set. It then prompts the user at the console to CON[TINUE] or
STOP the recovery process.
If the reply is CON[TINUE], DBRECOV keeps searching for the next log file. When the next
log file is found, DBRECOV resumes roll-forward recovery on the mirror database. The
CON[TINUE] or STOP prompt appears as long as DBRECOV cannot find the next log file in
the log set. DBRECOV is stopped if the STOP reply is entered and a RESTART file
containing all the necessary information to restart recovery is created.
After the DBRECOV process is stopped, backup of the database in a consistent state can be
done and limited database maintenance on the secondary system can be performed. Some
DBUTIL functions cannot be performed while the DBRECOV process is stopped. If the
database is in RESTART mode, the following DBUTIL processes cannot be performed:
• Access is not allowed in order to keep the database logically consistent.
• Resetting the maintenance word is not allowed. If the maintenance word were to be
reset, RESTART would be impossible.
• Purging or erasing the database is not allowed. If either of these options were used in
DBUTIL, the recovery process would be invalidated. (The user must run
DBRECOV,ABORT or DBRECOV,PURGE before purging or erasing the database.)
DBRECOV,RESTART restarts the roll-forward recovery process from the point it was stopped.
DBRECOV uses the information in the RESTART file to restart recovery. DBRECOV continues
until, once again, it cannot find the next log file in the log set. The prompt to CON[TINUE]
or STOP is displayed and backup of the database can again be done.
If RESTART recovery from the current STOP point cannot be done, DBRECOV,ABORT can be
used. Recovery can no longer be restarted from the same point that it was stopped once