Ora-14061: cannot change data type or length of index partition column

Time:2020-3-10

Error occurred when modifying the primary key of partition table:

Error starting command on line: 2-
alter table KC23 modify AAZ210 VARCHAR2(50)
Error reporting
SQL error: ora-14061: cannot change data type or length of index partition column
14061. 00000 –  “data type or length of an index partitioning column may not be changed”
*Cause:    User issued ALTER TABLE statement attempting to modify
           data type and/or length of a column used to partition some index
           defined on the table named in ALTER TABLE statement, which is
           illegal
*Action:   Avoid modifying data type and/or length of index
           partitioning column(s)

 

– solution:

 

ALTER TABLE KC23 drop CONSTRAINT PK_KC23;
drop index PK_KC23;

alter table KC23 modify ( AAZ210 VARCHAR2(50));

alter table KC23 add constraint PK_KC23 primary key(AAZ210) using index TABLESPACE TBSB_SJQY;

ALTER TABLE KC23 enable CONSTRAINT PK_KC23;