TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Appendix G 665
Recovery and Logging Quick Reference
Sample Job Streams
Figure G-1. Sample Job Stream for Starting Logging Cycle
:JOB MGR.DATAMGT
:GETLOG ORDERLOG;LOG=ORDER001,DISC
Acquire log identifier.
:BUILD ORDER001;DISC=200000,20,7;CODE=LOG
Build new log file.
:RUN DBUTIL.PUB.SYS
SET ORDERS LOGID=ORDERLOG
Response to logid password prompt.
ENABLE ORDERS FOR LOGGING
Set the database flags in
DISABLE ORDERS FOR ACCESS
the root file.
ENABLE ORDERS FOR RECOVERY
ENABLE ORDERS FOR MUSTRECOVER
EXIT
:RUN DBSTORE.PUB.SYS
Store the database.
ORDERS
:LOG ORDERLOG,START
Start the logging process;
logid is ORDERLOG.
:RUN DBUTIL.PUB.SYS
ENABLE ORDERS FOR ACCESS
Set the database flags
DISABLE ORDERS FOR RECOVERY
in the root file.
ENABLE ORDERS FOR MUSTRECOVER
EXIT
:EOJ
The job stream above builds a new log file. In this case, the log file resides on disk and sets
the database flags. Note that because no logid password was specified in the GETLOG
command, a blank line is left as a response to the password prompt. A backup copy of the
database is made (this sets the date and time the copy was made in the root file), logging is
initiated with START, the database is enabled for access, and recovery is disabled.
At the end of the logging cycle, stop logging, store the current log file on tape for back-up,
purge the current log file, build a new log file, and store a database backup copy. To start a
logging cycle, the steps (except GETLOG command) shown in the previous job stream in
Figure G-1. are completed after you do the following:
:LOG ORDERLOG,STOP
Stop logging.
Use STORE command to store the log file to tape.
:PURGE ORDER001
Purge the current log file.
The next example in Figure G-2. uses roll-forward recovery and DBSTORE/DBRESTORE.Ifall
recommended procedures have been followed, the database backup copy will have flags set
for enabling recovery and disabling access, so the step to set these flags would be
unnecessary. If this process is being done interactively, the following command in DBUTIL
will show if the flags for recovery and access are correctly set:
>>SHOW
database name
FLAGS