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


1  EXECUTE FUNCTION
1 admin
1 task
2  (
3.1 "check data"
3.1 "check data only"
3.1 "check data repair"
2  , "partition_number"
2 )
2 ;
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");