CHECK check_spec [ BUT { ONLY | NOT } check_object [,...] ] AT LEVEL { PENDINGOP | ONE | TWO | THREE } [ WITH ERROR LIMIT = [ nnn ] | WITH NO ERROR LIMIT ] [ SKIPLOCKS ] [ IN SERIAL | IN PARALLEL [ TABLES = n ] [ MAXSESSIONS ] ] [ PRIORITY = { L | M | H | R | performance_group_name } ] [ CONCURRENT MODE [ RETRY LIMIT n ] ] [ ERROR DOWN | DOWN ONLY ] [ COMPRESSCHECK ] [ CHECKINVALIDS ] [ SCOPE { DICTIONARY | USER | ALL } ] ;
- check_spec
{ ALL TABLES [ EXCLUDE [dbname.]table_name [,...] ] | dbname EXCLUDE [dbname.]table_name [,...] | [dbname.]table_name [,...] | AGAIN [ Error-filename ] }
- check_object
{ INDEX ID = nnn | UNIQUE INDEXES | NONUNIQUE INDEXES | REFERENCE ID = nnn | REFERENCE INDEXES | DATA | LARGE OBJECT ID = nnn | LOB ID = nnn | LARGE OBJECTS | LOBS | SJI ID = nnn | SJIS }
Syntax Elements
- ALL TABLES
- CheckTable checks all tables, join indexes, and hash indexes
in all databases in the system. CheckTable considers join and hash indexes as tables. References to tables in this discussion should be interpreted as encompassing tables, join indexes, and hash indexes.
- dbname
- CheckTable checks all tables, join indexes, and hash indexes in the specified database.
- AGAIN
- Re-checks tables that failed the previous check.
- Error-filename
- Error-filename is a Linux filename.
- EXCLUDE
- CheckTable excludes the specified tables or databases from
the check.
- CHECK ALL TABLES EXCLUDE excludes one or more databases or tables.
- CHECK dbname EXCLUDE excludes one or more tables in a particular database.
- tablename or dbname.tablename
- CheckTable checks a specific table, join index, or hash index, including global temporary tables.
- BUT ONLY
- BUT NOT
- Places constraints on what CheckTable checks:
- BUT ONLY causes CheckTable to check only the subsequently specified objects.
- BUT NOT causes CheckTable to skip checking of the subsequently specified objects.
- INDEX ID = nnn
- Specifies a specific secondary index (specified by its index ID) when using a constraint with CheckTable. In general, specify this option only when you want to check a single table.
- UNIQUE INDEXES
- Specifies all unique secondary indexes when using a constraint with CheckTable.
- NONUNIQUE INDEXES
- Specifies all Nonunique Secondary indexes when using a constraint with CheckTable.
- REFERENCE ID = nnn
- Specifies a specific reference index (as specified by its index ID) when using a constraint with CheckTable.
- REFERENCE INDEXES
- Specifies all reference indexes when using a constraint with CheckTable.
- DATA
- Specifies the data subtable when using a constraint with CheckTable.
- LARGE OBJECT ID = nnn
- Specifies a specific large object (as specified by its ID) when using a constraint with CheckTable.
- LOB ID = nnn
- Specifies a specific large object (as specified by its ID) when using a constraint with CheckTable.
- LARGE OBJECTS
- Specifies all large objects when using a constraint with CheckTable.
- LOBS
- Specifies all large objects when using a constraint with CheckTable.
- SJI ID =nnn
- Specifies a specific system defined join index (as specified by its index ID) when using a constraint with CheckTable.
- SJIS
- Specifies all system defined join indexes when using a constraint with CheckTable.
- AT LEVEL
- Can be one of PENDINGOP, ONE, TWO, or THREE:
- PENDINGOP provides a list of tables for which pending operations exist.
- ONE isolates specific tables with errors.
- TWO provides a detailed check of:
- Consistency of row IDs
- Checksum of primary and fallback rows
- Hash codes
- THREE provides the most diagnostic information, but uses more system resources and requires more time. Use this level of check only when necessary.
- WITH ERROR LIMIT= nnn
- CheckTable stops checking a table if it finds nnn or more errors. If CheckTable was checking more than one table, it continues on to the next table.
- WITH NO ERROR LIMIT
- CheckTable reports all errors for each table.
- SKIPLOCKS
- CheckTable skips all locked tables automatically.
- IN SERIAL
- IN PARALLEL
- Specifies the mode of checking CheckTable uses:
- IN SERIAL means CheckTable checks a single table at a time. This is the default.
- IN PARALLEL means CheckTable checks multiple tables simultaneously. Using PARALLEL mode saves time but is resource intensive. The number of tables that CheckTable can check simultaneously in parallel depends on resource availability. You can check the status of the number of parallel checks CheckTable performs at any time. For information on how to check the status, see Determining the Status of a Table Check.
- MAXSESSIONS
- Runs user table check with the maximum number of parallel sessions.
- TABLES=n
- Optionally used with IN PARALLEL to specify the upper limit on the number of tables that will be checked simultaneously. The value of n can be any integer from two through eight.
- PRIORITY =
- Specifies the priority at which CheckTable should run. This option can be used to control resource usage and improve performance. The available priority levels are:
- L - Low
- M - Medium
This is the default, if the PRIORITY= option is not specified.
- H - High
- R - Rush
- CONCURRENT MODE
- Use when running on a non-quiescent system. CONCURRENT MODE reduces lock contention by optimizing the locking protocol and by automatically skipping the locked tables to retry them later. After CheckTable checks all tables, CheckTable automatically retries all tables that were skipped due to lock contention.
- RETRY LIMIT n
- The duration in minutes that CheckTable waits before attempting to re-check a table that was skipped during CONCURRENT MODE operation.
- ERROR ONLY
- CheckTable displays only bypassed tables and tables that have errors or warnings. This option allows you to quickly identify and address problems that CheckTable finds.
- DOWN ONLY
- Vantage can isolate some file system errors to a specific data or index subtable, or to a contiguous range of rows ("region") in a data or index subtable, it marks only the affected subtable or region down. This improves system performance and availability by allowing transactions that do not require access to the down subtable or rows to proceed, without causing a database failure that requires a system restart.
- COMPRESSCHECK
- CheckTable compares the compression information (compress multi-value and name of compression algorithm UDF if specified in table definition) from the table header to the corresponding information stored in the CompressValueList column of the DBC.TVFields table.
- CHECKINVALIDSI
- Causes CheckTable to continue index checks, even if it encounters an invalid secondary index. If this option is not specified, CheckTable bypasses further index checks and logs a warning message when it encounters an invalid SI. By allowing CheckTable to continue index checking, this option may result in a more detailed error reported that can help determine why the index is invalid.
- SCOPE
- Use with one of the following:
- DICTIONARY: Runs only a dictionary check with batch mode error logging for the given CheckTable command.
- USER: Runs only a user table check for the given CheckTable command.
- ALL: Runs a dictionary check in batch mode with error logging and user table check for the given CheckTable command.