Checking a Database

The Database Checking utility (DBCHECK) displays the database status and checks the database and index files for logical integrity, as follows:

You can specify the 'Maximum period between integrity checks (in days)' within the Console/Transaction logging screen of the DP4 system setup utility. For example, specifying a value of 1 for this option forces a daily integrity check, while 7 forces a weekly check. If you enter a NULL (!) value, you will never be forced to carry out an integrity check. When the specified number of days has elapsed and you attempt to use a DP4 utility, such as the database browser, or other program that can update the database, a warning message informs you that an integrity check must be run first.

You MUST run the database integrity checking utility often enough to ensure that you have at least one good database backup. For example, if you back up your database every week and keep the last four backups before recycling the disks, do a full integrity check at least every four weeks. If at all possible check database integrity before avery backup so that you can be sure never to have a bad backup.

It is also a good idea to run an integrity check after restoring your system from a backup. This is especially important where you need to guard against a partial backup. For example, if you have backed up from tape or used the facilities of the operating system to copy database files, running a database integrity check with the -QUICK command tail is sufficient, providing you ran a full integrity check on the backup from which you are restoring.

If uninterrupted operation of the database is required, there are two possibilities for checking database integrity

The following topics are covered in this section: