4-6 IBM Informix OnLine Database Server Administrator’s Guide

Consistency Checking

Consistency Checking
OnLine 5 contains a page-level layer of checks that can detect data inconsis-
tencies that might be caused by hardware or operating system errors or by
unknown problems associated with OnLine operation. Associated with this
consistency checking are four environment variables that, if set, collect
diagnosticinformation that can be useful for IBM Informix technical support
staff. (Descriptions of the four environment variables start onpage 4-9.)

Using the tbcheck Commands

To gain the maximum benefit from consistency checking and to ensure the
integrity of archives, periodically verify that all data and OnLine control
information is consistent. Because of the time needed for this check and the
possible contentions that the checks cause, schedule this check for times
when activity is at its lowest. Informix recommends that you perform this
check just prior to creating a level-0 archive.
The commands you should run as part of the check are listed here and
described in the paragraphs that follow:
tbcheck -cr
tbcheck -cc
tbcheck -ce
tbcheck -cIdbname
tbcheck -cDdbname
You can run each of these commands while OnLine is in online mode. The
tbcheckcommands that include a database lock each table in the database for
theduration of the check. The tbcheck -cI and -cD commands lock each table
asthe table is checked, denying access to all other database server processes.