-650 THE ALTER STATEMENT CANNOT BE EXECUTED, REASON reason-code

Explanation

The ALTER statement cannot be executed for the indicated reason.

reason-code
A numeric value that indicates the reason that the statement cannot be executed.
5
An ALTER statement with a PIECESIZE clause is not allowed for a partitioning index.
6
An ALTER statement with a PIECESIZE 4G clause is not allowed for non-partitioned indexes on a non-large table.
7
An ALTER statement with a DSSIZE clause is allowed only for LOB and universal table spaces.
8
An ALTER statement with a SEGSIZE clause is allowed for universal table spaces and partitioned table spaces that use table-controlled partitioning.
9
An ALTER statement with a BUFFERPOOL clause where a different page size is specified is allowed only for LOB and universal table spaces (excluding XML table spaces).
10
An ALTER statement with a MAXPARTITIONS clause is allowed only for the following table spaces:
  • Single-table simple table spaces
  • Single-table segmented table spaces
  • Universal table spaces that use partition-by-growth organization
11
An ALTER statement with an ENDING AT clause is not allowed for an index on a partitioned base table with LOB columns or the table itself.
12
ALTER INDEX is not allowed when there is a pending SQL statement.
13
ALTER TABLE is not allowed when there is a pending SQL statement.
14
An ALTER INDEX statement with an ENDING AT clause is not allowed when using table-controlled partitioning.
15
Using ALTER to change the attributes of a partition values is not allowed for an index on a partitioned base table with LOB columns, or the table itself.
16
ALTER TABLE DATA CAPTURE CHANGES is not allowed for table spaces in advisory REORG-pending (AREO) state.
17
ALTER TABLE DROP CLONE cannot be used to drop a clone when the table itself is a clone.
18
ALTER INDEX is not allowed when the table has defined a clone.
19
ALTER TABLESPACE is not allowed when the table space contains a table that has a clone defined.
20
ALTER TABLE DROP CLONE cannot be used to drop a clone when the table does not have a defined clone.
21
ALTER TABLE SET DEFAULT is not allowed when all of the following conditions are true:
  • The table exists in a table space that currently has the DEFINE YES attribute.
  • The ALTER TABLE statement references a column that was not part of the original table definition.
  • The table has not been reorganized since the referenced column was added.
22
ALTER TABLE SET DEFAULT and DROP DEFAULT are not allowed for tables referenced by a materialized query table or view.
23
ALTER TABLE DROP DEFAULT is not allowed when the table space is in the advisory REORG-pending (AREO*) state.
24
An ALTER TABLE statement with pending options is allowed only for universal table spaces.
25
ALTER TABLE DROP DEFAULT is not allowed when all of the following conditions are true:
  • The table space is in either the advisory REORG-pending (AREO*) or REORG-pending (REORP) state.
  • The ALTER TABLE statement references a column that was not part of the original table definition.
  • The table has not been reorganized since the referenced column was added.

In this case, a mass UPDATE can be used to clear the AREO* state.

26
An ALTER VIEW statement with a REGENERATE clause is not allowed if the view is referenced by a materialized query table.
27
For an ALTER TABLE statement that names a materialized query table, the alterations are limited to the following situations:
  • Changing the materialized query table attributes
  • Turning the materialized query table to a base table
  • Specifying the following clauses:
    • ADD RESTRICT ON DROP
    • ALTER MATERIALIZED QUERY
    • ALTER PARTITION
    • AUDIT
    • DATA CAPTURE
    • DROP MATERIALIZED QUERY
    • DROP RESTRICT ON DROP
    • ROTATE PARTITION
    • KEY LABEL
    • NO KEY LABEL

ADD RESTRICT ON DROP and DROP RESTRICT ON DROP clauses cannot be used in the same statement.

28
ALTER TABLE is not allowed for an accelerator-only table unless the only alteration that is specified is either ADD RESTRICT ON DROP or DROP RESTRICT ON DROP.
29
ALTER TABLESPACE is not allowed when the table space contains an accelerator-only table.
Start of change32End of change
Start of changeAn ALTER statement with an ADD PARTITION clause attempted to insert a partition. This is not allowed for one of the following reasons:
  • The table is not in a partition-by-range table space.
  • The partition number is not valid.
  • The limit key value is not valid for an affected partition.
  • The table contains a LOB column, or a distinct type column that is based on a LOB data type.
End of change
34
ALTER TABLESPACE COMPRESS is not allowed for a LOB table space when the associated base table space is not a universal table space.
Start of change35End of change
Start of changeALTER TABLESPACE PAGENUM is not successful because the table space is not a partition by range table space.End of change
Start of change36End of change
Start of changeALTER TABLESPACE PAGENUM is not successful because the table space is DEFINE NO, but at least one index for the table space is DEFINE YES.End of change
Start of change37End of change
Start of changeALTER TABLESPACE PAGENUM is not successful because an invalid keyword was specified. PAGENUM must be followed by the keyword RELATIVE.End of change
Start of change38End of change
Start of changeALTER TABLESPACE PAGENUM is not successful because the table space uses a hash organization, or ALTER TABLE cannot be used to add hash organization when the table resides in a table space that uses relative page numbers.End of change
Start of change39End of change
Start of changeALTER TABLESPACE PAGENUM is not successful because the table contains truncated limit key values.End of change
Start of change40End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a table that exists in the table space that is being altered.End of change
Start of change41End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a simple or segmented (non-UTS) table space that is to be altered.End of change
Start of change42End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a table space that exists in the same database as the table space that is being altered.End of change
Start of change43End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a target table space that is a partition-by-growth universal table space.End of change
Start of change44End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a target table space that does not already have data sets created.End of change
Start of change45End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a target table space that is defined with MAXPARTITIONS 1.End of change
Start of change46End of change
Start of changeFL 508 An ALTER TABLESPACE statement with a MOVE TABLE clause must specify a target table space that is defined with the same LOGGED attribute as the source table space. End of change
Start of change47End of change
Start of changeFL 508 If a table space is the target of a pending definition change to move a table, the target table space cannot be dropped and re-created before the pending change is materialized.End of change
Start of change48End of change
Start of changeFL 508 An ALTER TABLESPACE with a MAXPARTITIONS clause to convert the table space to a partition-by-growth universal table space must specify MAXPARTITIONS 1 if a pending definition change to move a table from the table space exists.End of change
Start of change49End of change
Start of changeFL 509 ALTER TABLESPACE COMPRESS YES HUFFMAN is not allowed for a non-universal table space.End of change
Start of change50End of change
Start of changeFL 509 ALTER TABLESPACE COMPRESS YES FIXEDLENGTH or COMPRESS YES HUFFMAN is not allowed for a LOB table space.End of change
Start of change51End of change
Start of changeFL 509 ALTER TABLESPACE COMPRESS YES HUFFMAN is not allowed for a table space that uses a hash organization.End of change
ALTER TABLE with an ALTER PARTITIONING clause is not allowed if the maximum number of partitions for the new partitioning scheme is less than the existing maximum number of partitions where the table is defined with DATA CAPTURE CHANGES, and the table's table space data sets are defined.

System action

The statement cannot be processed.

Programmer response

Correct the error based on the information provided for the reason-code value, and reissue the statement.

Start of changeFL 508 For errors due to incorrect definition of the target table space for a pending definition change to move a table, take one of the following actions:
  • Alter the target table space to specify the correct attributes.
  • Complete the following steps:
    1. Drop all pending definition changes, including the MOVE TABLE operation, associated with the source table space.
    2. Drop the target table space.
    3. Re-create the target table space with the correct attributes.
    4. Execute all the pending definition changes again.
End of change

SQLSTATE

56090