KFAA31603-E
Unable to aa....aa. (reason = bb....bb) (M+J+O)
The data type of a column by ALTER TABLE statement cannot be changed. <SQLSTATE: 42I75>
- aa....aa: Operation resulting in an error
-
-
change the data type of the column by ALTER TABLE statement
Changing the data type of a column using the ALTER TABLE statement
-
- bb....bb:
-
Cause of the error
- S:
-
Ignores this SQL statement. Alternatively, the system invalidates this transaction.
- Action:
-
Take corrective action as described in the following table: Then, re-execute the ALTER TABLE statement.
Information output to bb....bb
Cause of the error
Corrective action to take
the specified column comprises a multiple-column B-tree index in which the total data length of the indexed columns exceeds 255 bytes
When changing the data type of a column of type VARCHAR with a data length of 254 bytes or less, the column whose data type is to be changed is an index component column of a multiple-column index, and the total length of the columns in an index of the multiple-column index after the data type change is 256 bytes or more after changing the data type.
See How to change the data type of a column in a base table (how to increase the data length of a column of type VARCHAR) in the manual HADB Setup and Operation Guide and change the data type of the column.
the total data length of the column comprising the B-tree index which is determined by the changed data length exceeds the maximum length
When changing the data type of a VARCHAR column with a data length greater than 256 bytes and less than 31,999 bytes, the column whose data type is being changed is a constituent column of the B-tree index, and the total data length of the constituent columns of the changed B-tree index exceeds the upper limit.
Take one of the following actions to ensure that the total data length of the columns in the B-tree index after the change satisfies the conditions described in Changing the data type (VARCHAR data length) of the base table columns in Specification format and description of the Specification format and rules for the ALTER TABLE statement in the manual HADB SQL Reference.
-
Reduce the data length after the change
-
Make the page size larger for the data DB area that stores the B-tree index
To increase the page size of the data DB area, you need to delete the data DB area using the adbmodarea command and then recreate it. For how to recreate a data DB area, see Steps to take when a data DB area can no longer be expanded in the HADB Setup and Operation Guide.
the specified column defines a text index
A text index is defined for the column you are trying to change the data type of.
See How to change the data type of a column in a base table (how to increase the data length of a column of type VARCHAR) in the manual HADB Setup and Operation Guide and change the data type of the column.
the specified column comprises a foreign key
The column whose data type is to be changed is the column comprising the foreign key.
the specified column comprises a primary key that is referenced from a foreign key
The column whose data type is to be changed is the constituent column of a primary key that is referenced by a foreign key in another table.
-