>>-CHECK DATA--+------------+-----------------------------------> '-WITH BLOBS-' >--+-+-| TABLE |-------------+--+----------------------------------+-+--> | '-IN DATABASE--database-' | (1) | | | '-COSERVER--| Coserver_List |------' | '-+-| TABLE_FRAG |---------+--+---------------+-------------------' '-IN TABLESPACE--partnum-' '-PAGE--pagenum-' >--+------+--+--------+--+------------------------+------------>< '-LOCK-' '-REPAIR-' +-DISPLAY----------------+ '-SAVE--+--------------+-' '-IN--filename-'
TABLE: |--IN TABLE--database--:--+----------+--table_name--------------| '-owner--.-'
TABLE_FRAG: |--IN TABLE--database--:--+----------+--table_name--,-----------> '-owner--.-' >--dbspace_name-------------------------------------------------|
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
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. |
partnum | The tblspace number that you want to check for consistency | Value must be an integer between 0 and 208,666,624, inclusive. | Unsigned integer. |
pagenum | An integer value that you use to indicate a particular page in a tblspace | Value must be an unsigned integer between 0 and 16,777,215, 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. |
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. |
dbspace_name | The name of the dbspace that you want to check | The dbspace must exist. | See the chapter on where data is stored in the IBM Informix: Administrator's Guide. |
Use the onutil CHECK DATA command to check the consistency of all pages of a table fragment or a single page of data. The onutil CHECK DATA command checks entries in the bit-map page against the pages to verify mapping.
Use the LOCK option of onutil CHECK DATA to place a shared lock on the data being checked while the check is in progress. Use the REPAIR option to repair low-level inconsistencies that CHECK DATA encounters. The REPAIR option cannot correct serious data corruption detected by onutil.
A specific coserver owns and manages each dbspace. The physical disk on which the dbspace resides belongs to the node on which the coserver executes. This coserver is referred to as the home coserver.
SELECT partn FROM sysfragments,systables WHERE
systables.tabid = sysfragments.tabid
AND systables.tabname = tablename;
$onutil
> CHECK DATA IN TABLESPACE 196626;
You can specify a single page to check for consistency when you specify the PAGE clause. Use the DISPLAY clause to display a hexadecimal dump of the specified page.
The following example shows other ways to check the consistency of a table:
$onutil > CHECK DATA IN TABLE mydb:myname.mytable, myfrags1 PAGE 5; > CHECK DATA IN TABLE mydb:myname.mytable COSERVER svr.2; > CHECK DATA WITH BLOBS IN DATABASE mydb;