Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Defining the scope of checking

&pagelevel(4)&pagelevel

It is possible to define both the checking mode and the scope of checking. BCHECK has facilities for overall checking and incremental checking.

Overall checking

BCHECK checks the database in its entirety for consistency.

The following can be checked: the original database or a shadow database.

Overall checking must always be performed if there is no consistent copy of the database or the existing copy has not yet been checked.

It is also required if the database has been restructured or reorganized, and there is either no consistent copy of the changed database or the existing copy has not yet been checked.

Incremental checking

BCHECK only checks the pages that have changed with respect to a shadow database of an earlier database status. BCHECK can determine which page contents have changed by comparing the previous shadow database with the original database or with a more recent shadow database. The older shadow database then only needs the DBDIR if this has been changed.

Incremental checking saves a considerable amount of time when compared to overall checking, since in most cases BCHECK does not have to check all pages in the database. The extra time involved in reading every non-empty page twice is counterbalanced by the saving involved in checking only the modified pages and - in SORTING mode - by what is generally a far smaller volume of data to be sorted.

In SUMMING mode, the performance difference between overall checking and incremental checking is not very large. However, there is no general rule concerning the performance of the various checking modes in combination with the scope of checking.