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

330 Chapter7
Logging and Recovery
Logging Preparation
(with ONLINE=START or ONLINE=END)—after the preceding flags have been set in the
database. Logging status can be checked by referring to the procedure in "Logging Status"
later in this chapter.
Step 8--Making a Database Backup Copy
This step is required for roll-forward recovery. It is recommended (for protection in the
event of a hard disk failure), but not required, for roll-back recovery. There are two ways to
make a database backup copy:
use DBSTORE
use TurboSTORE/iX 7X24 True-Online Backup with ONLINE=START or
ONLINE=END option
Using DBSTORE
This explains the backup process using DBSTORE. See the section after this for information
on using TurboSTORE/iX 7X24 True-Online Backup.
Make a database backup copy using DBSTORE to store a copy of the database with flags
(access disabled, recovery enabled, logging enabled) set as specified in step 7. Because the
correspondence between log files and database backup copies is crucial, DBSTORE sets a
DBSTORE flag in the database root file, along with a time stamp designating the date and
time of the DBSTORE operation, before storing the database. DBSTORE can only store one
database at a time and requires that the database be closed during backup. Also, it does
not store all external files, such as third-party index files, along with the database.
NOTE
The DBSTORE flag is cleared by the first modification to the database (DBPUT,
DBDELETE,orDBUPDATE) indicating that the database no longer corresponds to
the stored copy.
Before logging is enabled, DBUTIL checks the DBSTORE flag to ensure that the working
database is the same as the database backup copy. For example, suppose a database is
stored and some modifications to the database are made before logging is enabled. If you
then try to enable logging, DBUTIL, determining that the DBSTORE flag has been cleared,
prints a message indicating that the present state of the (modified) database does not
correspond to the stored version. If the message is ignored, the resulting log file will not
contain all of the transactions that actually occurred against the working database.
Consequently, a recovery using the stored copy and the incomplete log file may fail or yield
erroneous results.
The following is an example of how to run DBSTORE:
:RUN DBSTORE.PUB.SYS
WHICH DATABASE? ORDERS
DATABASE STORED
END OF PROGRAM