DBCHECK

Makes various consistency and integrity checks on the database including status, file usage and record count. It is important to run this program at least once during your backup cycle (the period for which you keep backup media before re-using it for a new backup). For further information on this utility see Checking a Database in the DP4 Developer's Guide.

Command Tail Description

−LOCAL

Reduces the load on the DBMS and improves performance when the database resides on the same machine as DBCHECK

−STATUS

Select status

−USAGE

Show status and file usage

−CHECK

Check database integrity

−COUNT

Select record count (can redirect to printer)

Supply any of the four command tails above to suppress the display of the DBCHECK menu

−CORRUPT

Check a database which has the corrupt flag set

−FULL

Introduced in release 4.622/4.526 this option causes additional consistency checks to be made when checking the index file. This will almost always detect corruptions that would only otherwise show up with dynachek.

−HEAP NNNN

Set heap size (used for file buffers and so on.). Default for 32-bit systems is 4096 (4 Mbytes)

−PASS

Pass on error and continue checking

−QUICK

Speed up the integrity check by omitting some tests. If you use this option inconsistencies between the data and index file will not be detected. On most machines there should be no need to use this option.

−BATCH

Checks the database in "batch mode" without user interaction. The result is recorded in one of two files:

  • DP4PASS.MSG if the database passes

  • DP4FAIL.MSG if the database fails, in which case the cause of the failure is also recorded

DBCHECK does not delete these files it initialises, so you may need to do this manually if you intend to make use of these files.

Additional tails actioned with −BATCH

−CHECKSUMFAIL

DBCHECK reports error if checksum incorrect

−CHECKSUMAUTO

DBCHECK resets checksum to correct value if necessary.

If neither tail is specified no error is reported but checksum is not reset.