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

Use the check data argument with the admin() or task() function to check or repair all pages in the specified partition for consistency.

Syntax

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

>--(--+-"check data"--------+--,--"partition_number"--)--;-----><
      +-"check data only"---+                                
      '-"check data repair"-'                                

Element Description Key Considerations
partition_number The partition number in which to check the data. Find the partition numbers in the partnum column of the systables system catalog table.

Usage

Use the check data argument to read all pages, except for sbpages, and check each page for consistency. This argument is equivalent to the oncheck -cD command.

Use the check data only argument to read all pages, except for blobpages and sbpages, and check each page for consistency. This argument is equivalent to the oncheck -cd command.

Use the check data repair argument to repair inconsistent pages. This argument is equivalent to the oncheck -cD -y command.

Example

The following example checks the consistency of all pages in the partition 1048611:
EXECUTE FUNCTION task("check data","1048611");

Copyright© 2018 HCL Technologies Limited