oncheck -pp and -pP: Display the contents of a logical page

Syntax:

Read syntax diagramSkip visual syntax diagram oncheck  -pwfilename  -ppdatabase:owner.table,frag_dbs%frag_partrowidtblspacenumlogical pagenumnumber of pgs -pPchunknumpage offsetnumber of pgs
Element Purpose Key Considerations
database Specifies the name of the database containing the target page Syntax must conform to the Identifier segment; see IBM® Informix Guide to SQL: Syntax.
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.
frag_dbs Specifies the name of a dbspace that contains the target fragment Dbspace must exist and contain the target fragment.

Syntax must conform to the Identifier segment; see IBM Informix Guide to SQL: Syntax.

frag_part Specifies the partition name of the target fragment. This is useful in cases where more than one fragment of a table was created in the same dbspace. For fragmented tables or indexes that use expression-based or round-robin distribution schemes, you can create multiple partitions, which are collections of pages for a table or index, within a single dbspace. This partition is referred to as a fragment partition or frag_part.
logical pagenum Specifies an integer value that you use to indicate a particular page in a tblspace

Value can be expressed in decimal or in hexadecimal with a '0x' prefix.

Value must be an unsigned integer between 0 and 140,737,488,355,327, inclusive.
owner Specifies the owner of the target table You must specify the current owner of the table.

Syntax must conform to the Owner Name segment; see IBM Informix Guide to SQL: Syntax.

rowid Identifies the rowid of the row whose homepage you want to display. The rowid is displayed as part of oncheck -pD output Value must be an integer between -9,223,372,036,854,771,711 and 4,294,967,295, inclusive.

Value can be expressed as a signed integer or a hexadecimal with a '0x' prefix.

table Specifies the name of the table that contains the target page Table exists when you execute the utility.

Syntax must conform to the Table Name segment; see IBM Informix Guide to SQL: Syntax.

tblspacenum Identifies the tblspace that contains the target page Value must be an unsigned integer between 0 and 2,147,483,517, inclusive.

Value can be expressed as an unsigned decimal or a hexadecimal with a '0x' prefix.

The -pp option has the following syntax variations:
Invocation Explanation
oncheck -pp <tblspace #> <logical page #> <# of pages> Displays the contents of a page using a tblspace number and logical page number. You can also include an optional parameter specifying the number of pages to be printed.
oncheck -pp <tablespace #> <logical page #> -h Displays only the header of a page using a tblspace number and logical page number.
oncheck -pp <database>:<table> <rowid> Displays the contents of a page using a database name, table name, and the Informix® internal rowid. You can obtain this internal rowid with the oncheck -pD command. This internal rowid is not the serial rowid that is assigned in tables created with the CREATE TABLE tabname WITH ROWIDS statement. For more information, see Definition of Rowid

The output begins with a breakdown of the page header. The page contents appear in both hexadecimal and ascii format. The following examples show different invocations of the oncheck -pp command:

Print logical page 12 in tblspace 4194306:
oncheck -pp 4194306 12
Print logical pages 100, 101, and 103 in tblspace 0x0010015a:
oncheck -pp 0x10015a 100 3
Print the home page of rowid 0x211 in the stores_demo:orders table:
oncheck -pp stores_demo:orders 0x211
Print the home page of rowid 0x5a06 in the stores_demo:customer fragment contained in the frag_dbspce1 dbspace:
oncheck -pp stores_demo:customer, frag_dbspce1 0x5a06
Append the -h option to any of those commands to print only the page header(s):
oncheck -pp 0x001001ac 0x1fb 10 -h
The -pP option provides the following syntax variations:
Invocation Explanation
oncheck -pP <chunk#> <page offset> <# of pages> Displays the contents of a page using a chunk number and a page offset within the chunk. You can also include an optional parameter specifying the number of pages to be printed.
oncheck -pP <chunk#> <page offset> -h Displays only the header of a page specified by a chunk number and a page offset within the chunk.
Note: When oncheck -pP displays a page of type "CHUNK" (a chunk free list page), the output includes start and length fields. Those values are in decimal format.
Note:

The -pw option is required only when the Storage space encryption feature is enabled and no stash file is in use. Supply an optional path to a file containing the keystore password, otherwise oncheck will prompt for a password before displaying the requested page(s).

The following example shows typical output using the onstat -pP command:
$ oncheck -pP 1 12 3 -h
addr  size mode flags  type   nslots chksum frptr  frcnt  next prev stamp
1:12    2k 3    10008  CHUNK  7      4c6c   64     1972   0    0    100054c64
--------------------------------------------------------------------------------------------------------
addr  size mode flags  type  nslots chksum frptr  frcnt  stamp
1:13    2k 3    4      FREE  0      4c56   32     n/a    100054c5f
--------------------------------------------------------------------------------------------------------
addr size mode flags type   nslots chksum frptr frcnt next prev stamp
1:14   2k 3    10002 PARTN  5      4c99   326   1694  0    0    100054c93