TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 7 337
Logging and Recovery
Logging Maintenance
Logging Maintenance
You should determine a log maintenance cycle for the database. For example, suppose the
database is maintained on a daily cycle. This means that, at the beginning of each day, the
log process is initiated from the console with the LOG command and the flags are set (see
the following discussion). At the end of the day, the log process is stopped from the console
and the flags are reset for storage of the database backup copy. If you use TurboSTORE/iX
7x24 True-Online Backup (with ONLINE=START or ONLINE=END option) to back up
the database, the log process must remain active; you will not need to start and stop the
log process every day.
The duration of this maintenance cycle depends on at least two considerations:
• The amount of time needed to store the database periodically, and
• The amount of time required to recover the database from the log file using DBRECOV if
the system fails.
The more often the database backup copy is stored, the smaller the log file and the shorter
recovery time will be. Regular backup of the database is recommended, though not
required when using roll-back recovery. Refer to appendix G for a brief overview of the
disadvantages and benefits of logging to disk and logging to tape. This appendix also
includes sample job streams for the logging cycle.
Starting the Logging Process
After a database backup copy has been stored as described earlier in "Logging
Preparation," a logging process must be allocated to the log identifier so that it can be
activated. A log process is an MPE/iX system process responsible for buffering log records
in memory. If the log file is on tape, the log process also buffers the log records on disk
before writing them to the log file. This process is initiated from the console using the
MPE/iX LOG command. To issue the LOG command, you must have logging (LG) or operator
(OP) capability. The ALLOW command can be used to transfer permission to enter this
console command.
Syntax
:LOG
logid
, { START
RESTART
STOP }
Parameters
logid is the name of the logid to be activated; the logid must have been set
previously into the database root file.
START initiates a log process for the first time.
RESTART initiates a log process when appending new log records to an old log file.
STOP terminates a log process. Termination does not take effect until all current
users have closed the log file by calling the CLOSELOG intrinsic.