>>-CHECK INDEX WITH DATA--+-| INDEX |-------------+--+------+---> +-IN DATABASE--database-+ '-LOCK-' '-| TABLE |-------------' >--+------------------------+---------------------------------->< +-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. |
filename | The 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 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 Object Name in the IBM Informix: Guide to SQL Syntax. |
Use the onutil CHECK INDEX WITH DATA command to check the internal integrity of a B-tree index and cross-check the indexed data entities.
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 use the following onutil command to check the B-tree index of a table:
% onutil 1> CHECK INDEX WITH DATA IN DATABASE mydb; 2> CHECK INDEX WITH DATA IN TABLE mydb:myname.mytable;