Start of change

-148   THE SOURCE TABLE OR TABLESPACE source-name CANNOT BE ALTERED, REASON reason-code

Explanation

The ALTER statement issued could not be processed.

source-name
The name of the source table or table space.
reason-code
The reason for the message or SQL code, indicated by one of the following values:
01
The ALTER statement specified an ALTER COLUMN clause that attempted to drop the default value, alter the default value, or change the length of the column. The column cannot be altered because the column has a field procedure or is involved in a referential or check constraint. The default value cannot be changed because the column has a field procedure.
02
The ALTER statement specified an ALTER COLUMN clause that attempted to drop the default value, alter the default value, or change the length of the column. The column cannot be altered because the table that is identified by source-name might be one of the following:
  • A table that has an edit procedure or validation procedure.
03
The ALTER statement specified an ALTER COLUMN clause that attempted to drop the default value, alter the default value, or alter the data type of the column. The column cannot be altered because the table is defined with DATA CAPTURE CHANGES and the subsystem parameter RESTRICT_ALT_COL_FOR_DCC is set to YES.
04
The ALTER statement cannot be used to define a clone table because a clone table is already defined for source-name.
05
The ALTER statement cannot be used to define a clone table because table source-name is not in a universal table space or it is in a table space that is defined with PAGENUM RELATIVE.
06
The ALTER statement cannot be used to define a clone table because table source-name is involved in a referential or check constraint.
07
The ALTER statement cannot be used to define a clone table because table source-name has an after trigger defined on it.
08
The ALTER statement cannot be used to define a clone table because table source-name is a materialized query table.
09
Start of changeThe ALTER statement cannot be used to define a clone table because table source-name has more than one table space version or index version in use.End of change
10
Either of the following reasons:

The ALTER statement cannot be used to define a clone table because table space of table source-name or an index on table source-name was created with DEFINE NO, and the data set is not yet defined.

An auxiliary object for a source table with a LOB or XML column was created with DEFINE NO, and the data set is not yet defined

11
The ALTER statement attempted to change a table that has a defined clone, or a table that is a clone.
12
The ALTER statement cannot be used to define a clone table because table source-name is defined with an edit procedure, validation procedure, or field procedure.
13
The ALTER statement cannot be processed because an index exceeds versioning limit of 16.
14
An ALTER statement with an ALTER COLUMN clause attempted to change the data type from character FOR BIT DATA to BINARY, but the cast default value length exceeds 1536 UTF-8 bytes.
15
The ALTER statement cannot be processed because no pending changes are associated with the table space.
16
An ALTER TABLESPACE statement cannot include the MEMBER CLUSTER YES option for hash-organized table space.
17
The ALTER statement cannot be used to define a clone table because table source-name is hash-organized.

System action

The statement cannot be processed.

Programmer response

Change source-name to the name of an object that can be altered as specified and reissue the statement, or take an appropriate action for the reason-code value:

01
Do not attempt to change source-name to the name of an object that can be altered as specified and reissue the statement.
02
Do not attempt to change a column that is defined with an edit procedure or valid procedure.
03
Do not attempt to change or drop the default value, or change the data type of a column when the table is defined with DATA CAPTURE CHANGES and the subsystem parameter RESTRICT_ALT_COL_FOR_DCC is set to YES.
04
Before defining a clone table, verify that there is no clone table already defined for source-name.
05
Before defining a clone table, verify that table source-name is in a universal table space.
06
Before defining a clone table, verify that table source-name is not involved in a referential or check constraint.
07
Before defining a clone table, verify that table source-name does not have any AFTER triggers defined on it.
08
Before defining a clone table, verify that table source-name is not a materialized query table.
09
Start of changeBefore defining a clone table, verify that table source-name does does not have more than one table space version or index version in use.End of change
10
Before defining a clone table, verify that the data sets for source-name and its indexes are defined.
11
Drop the clone table, then alter the column. Use an ALTER TABLE statement with the DROP CLONE clause.
12
Before defining a clone table, verify that table source-name does not have an edit procedure, valid procedure, or field procedure.
13
Reduce the number of versions for the index, then issue the ALTER statement again.
14
Either reduce or drop the default value. To alter the default value, use an ALTER TABLE statement with ALTER COLUMN SET DEFAULT. To drop the default value, use an ALTER TABLE statement with ALTER COLUMN DROP DEFAULT.
15
Avoid altering a table space to drop the pending changes that do not exist.
16
Do not attempt to add the MEMBER CLUSTER YES option for a hash-organized table space.
17
Do not attempt to define a clone table for a hash-organized table.

SQLSTATE

42809

End of change