Technical Blog Post
Abstract
Command admin_move_table receives SQL0270N (Reason code = "52").for a partition table which uses generated column as partition key
Body
Summary:
Command admin_move_table receives SQL0270N (Reason code = "52").for a partition table which uses generated column as partitioning key
Details:
The table is defined as follows, note the partitioning key is a generated column.
CREATE TABLE MYTAB ... "SUBKEY" VARCHAR(96 OCTETS) NOT NULL IMPLICITLY HIDDEN GENERATED ALWAYS AS (SUBSTR(KEY,1,32)))..PARTITION BY RANGE("SUBKEY")...
Trying to use admin_move_table receives error:
$ CALL SYSPROC.ADMIN_MOVE_TABLE ('DB2INST1', 'MYTAB', '', '', '', '', '', ' ', '', 'COPY_USE_LOAD', 'MOVE')
SQL0270N Function not supported (Reason code = "52"). SQLSTATE=42997
In this scenario, calling admin_move_table involves alter the table with partitioning key which has a generated column.
Attempting to add, drop or alter a generated column expression for a column used in the table partitioning key results in error (SQL0270N rc=52).
Hence this is working as designed.
UID
ibm13286059