E Obsolete Database Utilities

DBPATCH utility

If the database ROOT file contains different information than the data sets (e.g. number of records), the database is considered corrupted and a status word -94 is returned by DBOPEN. This may be the result of a power failure or a kill -9 of the daemon in the "right" moment.

The recommended procedure to recover from a corrupted database is to reload the database from a backup, because this will guarantee a fast and consistent recovery. However, there are situations, where the only supported way to repair your database is to export it using dbexport, erase it using dberase and re-fill it using dbimport utility programs.

The dbpatch utility can be used for two different purposes:

Sample output of the dbpatch utility. The mark at the end of a line indicates a corrupted dataset:

EXPECTED REAL

DATA SET CAPACITY RECLEN ENTRIES RECLEN ENTRIES

---------------- -- - -------- ------ -------- ------ --------

INTERPRET 01 A 100 32 68 32 69 <

NAME 02 A 100 64 50 64 50

INHABER 03 M 200 76 161 76 161

DISC 04 D 500 128 2429 128 2430 <

THIS DOES NOT FIX ANY CORRUPTED DATA, it will simply suppress the status error.
However, this may be necessary, if time does not permit you to export/import the database.

NOTE: The use of the dbpatch utility with the write option is UNSUPPORTED and may result in unpredictable behaviour, due to errors in the "links" between data records or data sets (Master/Detail). You should repair a corrupted database using dbexport/dbimport as soon as possible.


Eloquence Database Manual - 19 DEC 2002