TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

340 Chapter7
Logging and Recovery
Logging Maintenance
to the current log file. The current log file is closed and the new log file is opened. A
message similar to the following message is displayed on $STDLIST and the console to
confirm the change:
Log file for
logid
ORDERLOG has been changed from ORDER001 to ORDER002
If the new log file is a serial file on tape, the following message appears on the console
requesting the mounting of a new log file (in this case the logid is ORDERLOG):
Mount new tape for
logid
ORDERLOG
If a LISTLOG command is executed while the logging process is performing a CHANGELOG
command, the file name displayed is that of the current log file. The log file name is not
updated until the CHANGELOG sequence successfully completes. The SHOWLOGSTATUS
command may be used to display the current status of a logging process to determine if a
CHANGELOG is taking place.
The following example shows a LISTLOG display. A CHANGELOG is currently taking place on
log file ORDER001; and, because the CHANGELOG to ORDER002 is not yet successfully
completed, ORDER001 is displayed:
:LISTLOG
LOGID CREATOR CHANGE AUTO CURRENT LOG FILE
MYLOG DATA.SYS NO NO MY.PUB.SYS
TAPELOG DATA.SYS YES TAPE001
ORDERLOG TST.MKTG YES YES ORDER001.MKTG.SYS
Recovering the Database
When a database needs to be recovered, DBRECOV starts with the first log file written to in
a given logging cycle, or it may start with the log file in use when backup was done using
TurboSTORE/iX 7x24 True-Online Backup (with ONLINE=START or ONLINE=END
option). If you used True-Online Backup, the SHOW
database
ALL command of DBUTIL
displays the name of the logfile for starting recovery.
To illustrate this concept, consider the following scenario when logging cycle began with a
logfile LOGF001 and DBSTORE was used for backup.
The MPE/iX CHANGELOG command or the GETLOG AUTO feature is being used to log
transactions to a log file called LOGF001. When LOGF001 fills up, user logging
automatically appends LOGF001 with a CHANGELOG record indicating that
TurboIMAGE/XL is now logging to file LOGF002. This process can continue until either
LOGF999 is reached or another file is encountered that has the same name as the one
being created by user logging.
Now, assume that the database needs to be recovered and the logging cycle is currently
writing to LOGF020. Note that DBRECOV will begin recovery at LOGF001, even if you know
or want to recover only the transactions from, for example, log file LOGF013.