.--------------------. V | >>-CHECK--+------------+--INFO--+---+-| TABLE_FRAG |-+-+-+------> '-ALLOCATION-' | '-| TABLE |------' | +-IN TABLESPACE--partnum-+ '-IN DATABASE--database--' >--+------+--+--------+--+------------------------+------------>< '-LOCK-' '-REPAIR-' +-DISPLAY----------------+ '-SAVE--+--------------+-' '-IN--filename-'
TABLE_FRAG: |--IN TABLE--database--:--+----------+--table--+------------+---| '-owner--.-' '-,--dbspace-'
TABLE: |--IN TABLE--database--;--+----------+--table-------------------> '-owner--.-' >--+------------------------+-----------------------------------| | (1) | '-| Coserver_List |------'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
partnum | A number that identifies the tblspace that you want to check for consistency | Value must be an integer between 0 and 208,666,624, inclusive. | Unsigned integer. |
database | The name of the database where the table resides | The database must exist. You cannot check databases on remote database servers. | See the IBM Informix: Guide to SQL Syntax. |
filename | The relative or absolute path and name of the file in which onutil stores the command output | If you run the onutil command from the command line, escape the double quotes around the filename. | Use the operating-system rules for the filename. |
owner | The name of the owner of the table | The owner that you specify must be the current owner of the table. Owner is mandatory for ANSI databases. | The user name must conform to the conventions of your operating system. |
table | The name of the table that you want to check for consistency | Table must exist. | See Identifiers in onutil Commands. |
dbspace | The name of a dbspace that contains a fragment you want to check for consistency | Dbspace must exist and contain the fragment that you want to check for consistency. | See Identifiers in onutil Commands. |
Use the onutil CHECK INFO command to display space usage for a table fragment. The space usage includes the maximum row size, the number of keys, the number of extents, the extent sizes, the pages allocated and used per extent, the current serial value and serial8 value, and the date that the table was created. The Extents fields list the physical address for the tblspace entry for the table and the address of the first page of the first extent.
To obtain a list of all the fragments in a table, query the systabnames table in the sysmaster database or systables system catalog table. The value in the partnum column in this systabnames table or systables system catalog table is the value that you specify in the partnum element in the TABLESPACE clause.
Use the ALLOCATION clause to display index-specific information and page-allocation information by page type, as the following example shows:
$onutil > CHECK INFO IN TABLESPACE 1111; > CHECK ALLOCATION INFO IN DATABASE mydb;
The LOCK option locks the table in share mode, so no other users can insert, update, or delete rows in the table while the check occurs. The REPAIR option repairs any inconsistencies the CHECK INFO command finds.
The command also displays the current lock level for the table. A table can have table-level locking (instead of page-level or row-level locking). If table-level locking is set, the onutil CHECK [ALLOCATION] INFO command displays the following message:
Page locking at RSAM level
Table locking at SQL level
If coarse-grain locking is set for an index, the onutil CHECK ALLOCATION INFO IN TABLE tabname DISPLAY or onutil CHECK INFO command displays this extra line in the section on what flags are set:
coarse-grain locking