check partition argument: Check partition consistency (SQL administration API)

Use the check partition argument with the admin() or task() function to print tblspace information for a table or fragment.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+---------------------------------->
                     '-task--'   

>--(--"check partition"--,--"partition_number"--)--;-----------><

Element Description Key Considerations
partition_number The number of the partition that you want to check for consistency. Find the partition numbers in the partnum column of the systables system catalog table.

Usage

The check partition argument with the task() function returns information that is equivalent to output of the oncheck -pt command. The output contains general information such as the maximum row size, the number of keys, the number and size of extents, the pages allocated and used per extent, the current serial value, and the date that the table was created.

The admin() function returns an integer that you can use to find information in the command_history table in the sysadmin database.

Example

The following example prints information for partition 1048611:
EXECUTE FUNCTION task("check partition","1048611");

Copyright© 2018 HCL Technologies Limited