>>-CHECK INDEX--+----------------------------+--+------+--------> +-IN DATABASE--database------+ '-LOCK-' '-+-IN TABLESPACE--partnum-+-' +-| TABLE |--------------+ '-| INDEX |--------------' >--+------------------------+---------------------------------->< +-DISPLAY----------------+ '-SAVE--+--------------+-' '-IN--filename-'
TABLE: |--IN TABLE--database--:--+----------+--table_name--------------| '-owner--.-'
INDEX: |--database--#--+----------+--index_name------------------------| '-owner--.-'
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
database | The name of the database where the index resides | The database must exist.
You cannot check databases on remote database servers. |
See Database Name in the IBM Informix: Guide to SQL Syntax. |
partnum | The table or index partition number that you want to check for consistency | Value must be an integer between 0 and 208,666,624, inclusive. | Unsigned integer. |
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. |
database | The name of the database where the table or index resides | The database must exist.
You cannot check databases on remote database servers. |
See Database Name in the IBM Informix: Guide to SQL Syntax. |
owner | The name of the owner of a table | Owner that you specify must be current owner of table. Owner is mandatory for ANSI databases. | The user name must conform to the conventions of your operating system. |
table_name | The name of the table that you want to check | Table must exist. | See Identifiers in onutil Commands. |
index_name | The name of the index that you want to check | The index must exist. | See Index Name. |
Use the onutil CHECK INDEX command to check the integrity of a B-tree index and display the contents of all nodes.
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.
For example, you can check the index of a table with these onutil commands:
% onutil 1> CHECK INDEX IN DATABASE mydb; 2> CHECK INDEX IN TABLE mydb:myname.mytable; 3> CHECK INDEX IN TABLESPACE 11111 DISPLAY;
Another way to check the index of a table follows:
1> CHECK INDEX mydb#myname.myindex