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

666 AppendixG
Recovery and Logging Quick Reference
Sample Job Streams
Figure G-2. Sample Job Stream for Roll-Forward Recovery
:JOB MGR.DATAMGT
:RUN DBUTIL.PUB.SYS
If the database is to be stored prior
DISABLE ORDERS FOR ACCESS
to recovery, set flags in the database
ENABLE ORDERS FOR RECOVERY
and run DBSTORE.
EXIT
:RUN DBSTORE.PUB.SYS
Current database on the system.
ORDERS
Optional step.
:RUN DBUTIL.PUB.SYS
PURGE ORDERS
Purge the current database.
EXIT
:RUN DBRESTOR.PUB.SYS
Restore backup copy of the database for recovery.
ORDERS
:RUN DBUTIL.PUB.SYS
DISABLE ORDERS FOR ACCESS
Set the flags in the database.
ENABLE ORDERS FOR RECOVERY
ENABLE ORDERS FOR MUSTRECOVER
EXIT
:RUN DBRECOV.PUB.SYS
Use roll-forward recovery on
RECOVER ORDERS
database ORDERS.
FILE PART1,SYS/P1D1.MKTG,0,3
The FILE command is used to
FILE PART2,SYS/P1D1.MKTG,0,3
route log records to individual
FILE PART3,SYS/P1D1.MKTG,0,3
user log files.
RUN
EXIT
:LOG ORDERLOG,RESTART
Restart current log file and set the
:RUN DBUTIL.PUB.SYS
database flags.
ENABLE ORDERS FOR ACCESS
DISABLE ORDERS FOR RECOVERY
ENABLE ORDERS FOR MUSTRECOVER
EXIT
:EOJ
Storing and purging the damaged database prior to restoring it is optional. After recovery
has completed, logging can either be restarted (from the current log file) or the log file can
be purged and a new log file built.
The next example in Figure G-3. uses roll-back recovery. If all recommended procedures
have been followed, the database will have flags set for enabling recovery and disabling
access, so the step to set these flags would be unnecessary. A backup of the database using
DBSTORE or TurboSTORE/iX 7x24 True-Online Backup (with ONLINE=START or
ONLINE=END option) can be done at this time; however, this is optional. 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