REORGCHK CLPPlus command

The REORGCHK CLPPlus command calculates statistics on the database to determine whether tables or indexes, or both, must be reorganized or cleaned up.

Invocation

You must run this command from the CLPPlus interface.

Authorization

You must have SELECT privilege on the catalog tables. You must have EXECUTE privilege on the REORGCHK_IX_STATS procedure.

Restriction

Support for this command is limited to Db2® servers.

Required connection

You must be connected to a database.

Syntax diagram

Read syntax diagramSkip visual syntax diagramREORGCHKON TABLEUSERSYSTEMALLtable-nameSCHEMAschema-name

Command parameters

TABLE [ USER | SYSTEM | ALL | table-name]
Where USER checks the tables that are owned by the authorization ID at runtime, SYSTEM checks the system tables, ALL checks all user and system tables, and table-name specifies which table to check. When you use table-name, the fully qualified name or alias must be used, for example, schema.tablename. The schema is the user name under which the table was created. If the table specified is a system catalog table, the schema is SYSIBM. For typed tables, the specified table name must be the name of the root table of the hierarchy.
SCHEMA schema-name
Checks all the tables that are created under the specified schema.

Examples

  1. This example performs REORGCHK on system tables.
    SQL> reorgchk on table system
  2. This example performs REORGCHK on table EMPLOYEE under schema manshanb.
    SQL> reorgchk on table manshanb.EMPLOYEE
  3. This example performs REORGCHK on all user and system tables.
    SQL> reorgchk on table all
  4. This example performs REORGCHK the tables that are owned by the runtime authorization ID.
    SQL> reorgchk on table user
  5. This example performs REORGCHK on schema named manshanb.
    SQL> reorgchk on schema manshanb