oncheck utility syntax
The oncheck utility checks specified disk structures for inconsistencies, repairs inconsistent index structures, and displays information about disk structures.
>>-oncheck--+-------------------------+------------------------->
| (1) |
'-| -FILE option |-----'
>--+-+- -ce-+-------------------------------------------------------------------+-->
| +- -pe-+ |
| +- -cr-+ |
| +- -pr-+ |
| +- -cR-+ |
| '- -pR-' |
+-+- -ci-+--+-----+--database--+---------------------------------------+-----+
| +- -cl-+ '- -x-' '-:--+--------+--table--+-------------+-' |
| +- -pk-+ '-owner.-' '-#index_name-' |
| +- -pK-+ |
| +- -pl-+ |
| '- -pL-' |
+-+- -cd-+--database--+--------------------------------------+---------------+
| '- -cD-' '-:--+--------+--table--+------------+-' |
| '-owner.-' +-,frag_dbs--+ |
| '-%frag_part-' |
+-+- -cc-+--+----------+-----------------------------------------------------+
| '- -pc-' '-database-' |
+-+- -pB-+--database--+-------------------------------------+----------------+
| +- -pt-+ '-:--+--------+--table--+-----------+-' |
| '- -pT-' '-owner.-' '-,frag_dbs-' |
+-+- -pd-+--+-database--+------------------------------------------------+-+-+
| '- -pD-' | '-:--+--------+--table--+-----------+--+-------+-' | |
| | '-owner.-' '-,frag_dbs-' '-rowid-' | |
| '-tblspacenum--+-----------------+-----------------------------' |
| '-logical pagenum-' |
+- -pp--+-database--:--+--------+--table--+-----------+--rowid-+-------------+
| | '-owner.-' '-,frag_dbs-' | |
| '-tblspacenum--logical pagenum-------------------------' |
+- -pP--chunknum--logical pagenum--------------------------------------------+
+-+- -cs-+--+---------+------------------------------------------------------+
| '- -cS-' '-sbspace-' |
+-+- -ps-+--+---------------------------+------------------------------------+
| '- -pS-' '-sbspace--partnum--pagenum-' |
+- -u--option--+------------------+------------------------------------------+
| '-(--arg_string--)-' |
'-+-----------+--------------------------------------------------------------'
+- -V-------+
'- -version-'
>--+-----+--+-----+--------------------------------------------><
+- -n-+ '- -q-'
'- -y-'
Element | Purpose | Key Considerations |
---|---|---|
-cc | Checks system catalog tables for the specified database | See oncheck -cc and-pc: Check system catalog tables. |
-cd | Reads all pages except simple large objects from
the tblspace for the specified database, table, or fragment and checks
each page for consistency Also checks tables that use a user-defined access method |
Does not check simple or smart large objects. |
-cD | Same as -cd but also reads the header of each blobpage and checks it for consistency | Checks simple large objects but not smart large objects. . |
-ce | Checks each chunk-free list and corresponding free space and each tblspace extent. Also checks smart-large-object extents and sbspace metadata | The oncheck process verifies that the extents
on disk correspond to the current control information that describes
them. See oncheck -ce, -pe: Check the chunk-free list. For background information, see Next-Extent Allocation. |
-ci | Checks the ordering of key values and the consistency
of horizontal and vertical node links for all indexes associated with
the specified table Also checks indexes that use a user-defined access method |
See oncheck -ci and -cI: Check index node links. |
-cI | Same as -ci but also checks that the key value tied to a rowid in an index is the same as the key value in the row | See oncheck -ci and -cI: Check index node links. |
-cr | Checks each of the root dbspace reserved pages for several conditions | See oncheck -cr and -cR: Check reserved pages. |
-cR | Checks the root dbspace reserved pages, physical-log pages, and logical-log pages | See oncheck -cr and -cR: Check reserved pages |
-cs | Checks smart large object and sbspace metadata for an sbspace | See oncheck -cs, -cS, -ps, -pS: Check and display sbspaces. |
-cS | Checks smart large object and sbspace metadata for an sbspace as well as extents | See oncheck -cs, -cS, -ps, -pS: Check and display sbspaces. |
sbspace | Indicates optional sbspace name If not supplied, all sbspaces are checked. |
None. |
-n | Indicates that no index repair should be performed, even if errors are detected | Use with the index repair options (-ci, -cI, -pk, -pK, -pl, and -pL). |
-pB | Displays statistics that describe the average fullness of blobspace blobpages in a specified table | These statistics provide a measure of storage efficiency for individual simple
large objects in a database or table. If a table or fragment is not specified,
statistics are displayed for the entire database. See oncheck -pB: Display blobspace statistics. For information about optimizing blobspace blobpage size, see the chapter on managing disk space in the HCL OneDB Administrator's Guide. |
-pc | Same as -cc but also displays the system catalog information as it checks the system catalog tables, including extent use for each table | None. |
-pd | Displays rows in hexadecimal format | See oncheck -pd and pD: Display rows in hexadecimal format. |
-pD | Displays rows in hexadecimal format and simple-large-object values stored in the tblspace or header information for smart large objects stored in an sbspace sbpage and simple large objects stored in a blobspace blobpage | See oncheck -pd and pD: Display rows in hexadecimal format. |
-pe | Same as -ce but also displays the chunk and tblspace extent information as it checks the chunk free list, the corresponding free space, and each tblspace extent | See oncheck -ce, -pe: Check the chunk-free list. |
-pk | Same as -ci but also displays the key values for all indexes on the specified table as it checks them | See oncheck -pk, -pK, -pl, -pL: Display index information. |
-pK | Same as -cI but also displays the key values and rowids as it checks them | See oncheck -pk, -pK, -pl, -pL: Display index information. |
-pl | Same as -ci but also displays the key values. Only leaf-node index pages are checked | See oncheck -pk, -pK, -pl, -pL: Display index information. |
-pL | Same as -cI but also displays the key values and rowids for leaf-node index pages only | See oncheck -pk, -pK, -pl, -pL: Display index information. |
-pp | Displays contents of a logical page | See oncheck -pp and -pP: Display the contents of a logical page. |
-pP | Same as -pp but requires a chunk number and logical page number or internal rowid as input | See oncheck -pp and -pP: Display the contents of a logical page. |
-pr | Same as -cr but also displays the reserved-page information as it checks the reserved pages | See oncheck -pr and pR: Display reserved-page information. |
-pR | Same as -cR but also displays the information for the reserved pages, physical-log pages, and logical-log pages | See oncheck -pr and pR: Display reserved-page information. |
-ps | Checks and displays smart-large-object and sbspace metadata for an sbspace | See oncheck -cs, -cS, -ps, -pS: Check and display sbspaces. |
-pS | Checks and displays smart-large-object and sbspace metadata. Lists extents and header information for individual smart large objects | See oncheck -cs, -cS, -ps, -pS: Check and display sbspaces. |
-pt | Displays tblspace information for a table or fragment | See oncheck -pt and -pT: Display tblspaces for a Table or Fragment. |
-pT | Same as -pt but also displays index-specific information and page-allocation information by page type (for dbspaces) | See oncheck -pt and -pT: Display tblspaces for a Table or Fragment. |
-q | Suppresses all checking and validation message | None. |
-x | Places a shared lock on the table when you check and print an index | Use with the -ci, -cI, -pk, -pK, -pl, or -pL options. For complete information, see Turn On Locking with -x. |
-y | Repairs indexes when errors are detected | None. |
-V | Displays the software version number and the serial number | See Obtaining utility version information. |
-version | Displays the build version, host, OS, number and date, as well as the GLS version | See Obtaining utility version information. |
chunknum | Specifies a decimal value that you use to indicate a particular chunk | Value must be an unsigned integer greater than
0. Chunk must exist. Execute the -pe option to learn which chunk numbers are associated with specific dbspaces, blobspaces or sbspaces. |
database | Specifies the name of a database that you want to check for consistency | Syntax must conform to the Identifier segment; see HCL OneDB Guide to SQL: Syntax. |
db1 | Specifies the local database that contains a data type that you want to check | Optionally specify the local database server name using the format db1@server1. |
db2 | Specifies the remote database that contains a data type that you want to check | Optionally specify the remote database server name using the format db2@server2. |
frag_dbs | Specifies 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. Syntax must conform to the Identifier segment; see HCL OneDB Guide to SQL: Syntax. |
index_name | Specifies the name of the index that you want to check for consistency | Index must exist on table and in database specified. Syntax must conform to the Identifier segment; see HCL OneDB Guide to SQL: Syntax. |
logical pagenum | Specifies 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. Value can be expressed as an unsigned integer or hexadecimal that begins with 0x identifier. |
object | Specifies the name of the DataBlade®, cast, operator , user-defined data type, or UDR that you want to check | If you do not specify an object name, the database server compares all objects of the same type with the same name and owner. |
owner | Specifies the owner of a table | You must specify the current owner of the table.
Syntax must conform to the Owner Name segment; for more information, see HCL OneDB Guide to SQL: Syntax. |
pagenum | Indicates the page number of the sbspace metadata portion to check and display | None. |
partnum | Identifies the sbspace metadata partition to check and display | None. |
rowid | Identifies the rowid of the row whose contents you want to display. The rowid is displayed as part of oncheck -pD output | Value must be an unsigned integer between 0 and 4,277,659,295, inclusive. Value can be expressed as an unsigned integer or hexadecimal that begins with 0x identifier. |
sbspace | Specifies the name of the sbspace that you want to check for consistency | None. |
server | Specifies the database server name | If you omit the database server name, oncheck uses the name that ONEDB_SERVER specifies. |
table | Specifies the name of the table that you want to check for consistency | Table exists when you execute the utility. Syntax must conform to the Table Name segment; for more information, see HCL OneDB Guide to SQL: Syntax. |
tblspacenum | Identifies the tblspace whose contents you want to display | Value must be an unsigned integer between 0 and 208,666,624, inclusive. Value can be expressed as an unsigned integer or hexadecimal that begins with 0x identifier. |