当前位置: 移动技术网 > IT编程>数据库>Oracle > ORA-14061: 不能更改索引分区列的数据类型或长度

ORA-14061: 不能更改索引分区列的数据类型或长度

2019年11月13日  | 移动技术网IT编程  | 我要评论

phyiren,我爱曲靖52新闻在线,张克芃

修改分区表主键时报错:

在行: 2 上开始执行命令时出错 -
alter table kc23 modify aaz210 varchar2(50)
错误报告 -
sql 错误: ora-14061: 不能更改索引分区列的数据类型或长度
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)

 

--解决:

 

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;

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网