今天,师弟更新数据的时候出现问题。出现“更新分区关键字列将导致分区的更改” ,看了下数据库,更新的表有分区,而且更新的字段是分区的关键字(从报错可以看出来了)。
网上找了下,说用这样可以:
但我没有试也没有这样做,可能是不放心,解决办法是不更新分区的关键字(因为系统不用更新它的,之前更新是因为hibernate处理它了)。如果的确要更新可以先删除了,再添加一个。引用 http://www.itpub.net/283642,1.html
Question: Why am I getting an ora-14402 error when I update a partition key
Answer: You cannot update the value of the partition key, the only way you can go about this is by deleting the old row and adding a new row to the table
网上找了下,说用这样可以:
alter
table
xxx enable row_movement;
但我没有试也没有这样做,可能是不放心,解决办法是不更新分区的关键字(因为系统不用更新它的,之前更新是因为hibernate处理它了)。如果的确要更新可以先删除了,再添加一个。引用 http://www.itpub.net/283642,1.html
Question: Why am I getting an ora-14402 error when I update a partition key
Answer: You cannot update the value of the partition key, the only way you can go about this is by deleting the old row and adding a new row to the table
本文讨论了在更新具有分区的数据库表时遇到的问题,特别是当更新字段为分区关键字时会出现ORA-14402错误。文章提供了两种解决方案:一是避免直接更新分区关键字,二是通过先删除后插入的方式进行变更。
497

被折叠的 条评论
为什么被折叠?



