oncheck -pd and pD: Display rows in hexadecimal format

Figure 1. Syntax:

1  oncheck
1 
2.1  -pd
2.1  -pD
2.1  database?  :? owner. table? ,frag_dbs? ,frag_part? rowid
2.1  tblspacenum? logical
pagenum

The -pd option takes a database, a table, a fragment, a fragment partition (fragpart), and a specific rowid or tblspace number and logical page number as input. In every case, -pd prints page-header information and displays the specified rows for the database object (database, table, fragment, internal rowid, or page number) that you specify in hexadecimal and ASCII format. No checks for consistency are performed.

Element Purpose Key Considerations
database Specifies the name of a database that you want to check for consistency Syntax must conform to the Identifier segment; see Informix® Guide to SQL: Syntax.
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 Informix® Guide to SQL: Syntax.

frag_part Specifies the fragment partition For fragmented tables or an index 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 fragpart.
logical pagenum Specifies an integer value that you use to indicate a particular page in a tblspace

Value can be expressed as an unsigned integer or hexadecimal that begins with 0x identifier.

Value must be an unsigned integer between 0 and 16,777,215, inclusive.
owner Specifies the owner of a table You must specify the current owner of the table.

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

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.

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; see Informix® 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.

If you specify an internal rowid (expressed as a hexadecimal value), the rowid maps to a particular page, and all rows from that page are printed.

If you specify a logical page number (expressed as a decimal), all the rows of the tblspace number with the logical page number are printed.

If you specify a fragment, all the rows in the fragment are printed, with their rowids, forward pointers, and page type.

If you specify a table, all the rows in the table are printed, with their rowids, forward pointers, and page type.

If you specify a database, all the rows in all the tables in the database are printed. TEXT and BYTE column descriptors stored in the data row are printed, but TEXT and BYTE data itself is not.

The -pD option prints the same information as -pd. In addition, -pD prints TEXT and BYTE values stored in the tblspace or header information for simple large objects stored in a blobspace blobpage. The following example show different options for the oncheck -pd and oncheck -pD commands:
oncheck -pd stores_demo:customer,frgmnt1
oncheck -pd stores_demo:customer
oncheck -pD stores_demo:customer 0x101
The following example shows a partial output of an oncheck -pD command:
oncheck -pD multipart:t1 : 

TBLspace data check for multipart:informix.t1
                  Table fragment partition part_1 in DBspace dbs1
page_type  rowid    length fwd_ptr
HOME       101      24     0
    0:  0  0  0  a 47 48 49 20 20 20 20 20 20 20 20 20   ....GHI
   16: 20 20 20 20 20 20 20 20
                                      ........