Types of checking that CHECK PLUS offers
CHECK PLUS offers three types of integrity checking as specified in the commands CHECK TABLESPACE, CHECK INDEX, and CHECK DATA. Within each of these types, you can customize what CHECK PLUS checks by selecting various options.
The following table describes the types of checking that you can perform with each command:
What CHECK PLUS checks | CHECK TABLESPACE | CHECK INDEX | CHECK DATA |
---|---|---|---|
Table space level 1 | * | * | * |
Table space level 2 | * | * | * |
Index level 1 | * | * | |
Index level 2 | * | ||
Validation of RI constraints dependent tables or all tables in a relational set | * | ||
Validation of RI constraints dependent tables or all tables in a relational set | * | * | * |
CHECK TABLESPACE command
CHECK TABLESPACE checks the structural integrity of the Db2 objects within a table space:
- Level 1 table space checking checks structural consistency within each data page.
- Level 2 table space checking checks structural consistency across data pages.
Level 2 table space checking also validates column data if you specify the VERIFY option or if table check constraints exist.
CHECK INDEX command
CHECK INDEX checks the integrity of the index structure:
- Level 1 index checking ensures structural consistency of the index pages.
- Level 2 index checking verifies index page consistency and index key to data consistency.
If running level 2 index checking, CHECK INDEX can also concurrently run any of the CHECK TABLESPACE levels.
CHECK DATA command
CHECK DATA checks Db2-defined RI and allows you to specify additional referential constraints that are not defined to Db2. It also verifies column data if table check constraints exist or via the VERIFY option. CHECK PLUS can run CHECK TABLESPACE level 1 or 2, or run CHECK INDEX level 1 on pages that it reads while performing the RI and table check constraint checking.