MUSTRECOVER for Logged Databases [ COMMUNICATOR 3000/XL XL RELEASE 3.0 ] MPE/iX Communicators
COMMUNICATOR 3000/XL XL RELEASE 3.0
MUSTRECOVER for Logged Databases
by Mark Boronkay
Commercial Systems Division/DBL
Although TurboIMAGE provides database logging and recovery, it does not
require that these options be used. If the database administrator
chooses not to recover the database after a system failure or halt, it is
possible that the database may remain in a logically inconsistent state.
Because of this, database administrators have requested a way of
preventing users from modifying a database until a proper recovery is
done. The MUSTRECOVER option allows the database administrator to
specify that a given database must be recovered after a system failure
before it can be used.
For a detailed description of how MUSTRECOVER works please refer to the
related article in the "Technical Articles" section in this Communicator.
EXPLANATION OF MUSTRECOVER
The first writer in a database enabled for MUSTRECOVER causes TurboIMAGE
to set an internal flag during DBOPEN. The flag is reset by the last
writer during DBCLOSE. When on, this flag informs TurboIMAGE that some
kind of data modification intrinsic (i.e., DBPUT, DBDELETE or DBUPDATE)
may have been called. If the system fails after DBOPEN has set this
internal flag, but before DBCLOSE has reset it, the flag will remain on
after the system is restarted. Subsequent DBOPENs by writers will fail
and will return a condition code of -34 in the first word of the status
array. This condition code signifies that the database must be recovered
before it can be DBOPENed successfully by a writer.
NOTE The database administrator can override this error and allow
database access without proper recovery by disabling MUSTRECOVER
(see Disabling MUSTRECOVER example #3 in the related article in the
"Technical Articles" section).
MPE/iX Communicators