ORA-14402: updating partition key column would cause a partition change

作者公众号,欢迎一起交流。

 

问题描述

        当更新分区表的分区键时,会出现ORA-14402错误。

演示:

表t_order_photo 是按照EDATE为分区键的分区表。

SQL> update t_order_photo t
  2  set t.edate=sysdate,editor='Alen',photo_status=0
  3  where t.id=611;
update t_order_photo t
       *
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change

解决办法

       对该表启用行移动。

演示:

SQL> alter table t_order_photo enable row movement;

Table altered.

SQL> update t_order_photo t
  2  set t.edate=sysdate,editor='Alen',photo_status=0
  3  where t.id=611;

1 row updated.

SQL>


版权声明:本文为Alen_Liu_SZ原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。