DB2 Error Code – -665 the part clause of an alter statement is omitted or invalid

In this post, you’ll learn about the error message -665 the part clause of an alter statement is omitted or invalid in the IBM DB2 database , the reason why it occurs along with the solution to fix it

IBM DB2 Error Message

-665 the part clause of an alter statement is omitted or invalid

Reason for the Error

The ALTER statement is invalid for one of the following reasons: *�� The table space or index is not partitioned and the PART clause is specified. *�� The table space or index is partitioned, a partition attribute (FREEPAGE or PCTFREE) is specified, and the PART clause is not specified. *�� The integer specified in the PART clause does not identify a partition of the table space or index. *�� A USING, PRIQTY, SECQTY, or ERASE clause is used to alter storage attributes, but the partition is not specified.

Solution

Determine whether the table space or index you want to alter is partitioned.� If it is partitioned, specify a PART clause that identifies the partition you want to alter.� If it is not partitioned, do not specify the PART clause.