Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Checking the formal correctness of tables and indexes

The database administrator can check the formal correctness of user data and indexes using the utility statement CHECK FORMAL. The check on the formal correctness essentially consists of a check on SESAM/SQL's internal blocks and tables.

With CHECK FORMAL, the database administrator can check a single base table, a single index, or all the base tables and indexes in a user space.

CHECK FORMAL is also permitted in connection with replications and SESAM backup copies present in the SQL database catalog list. CHECK FORMAL can also be used for foreign copies if the foreign copy is present as a database in the SQL database catalog list. To prevent it from losing its property of being a foreign copy, it must be added with ACCESS=READ.

The database whose spaces, tables and indexes are to be checked must be added to the DBH's database catalog with the ADMIN attribute so that defective spaces can be marked as such.

If the database is added to the SQL database catalog with ACCESS=READ, as a backup copy or as a replication then a defective space is not marked as such. In this case, references to the error can only be found in SQLSTATE and in the error file.

CHECK FORMAL error file

SESAM/SQL creates an error file for CHECK FORMAL or appends information to the existing file if CHECK FORMAL identifies inconsistencies.

The file name in the BS2000 user ID for the DBH is: catalog.space.EXC.C


catalog

Name of the database

space

Name of the user space for which the formal check is to be performed

In the case of CHECK FORMAL TABLE for a partitioned table, an error file with the space name of the partition is is created for each errored partition.

EXC.C

Default value of the name of the error file for CHECK FORMAL statements

SESAM/SQL enters a record in the error file for each discovered inconsistency. SESAM/SQL only creates/uses the error file if inconsistencies are genuinely identified.