oracle 14402,分区表的维护 - ORA-14402 更新分区关键字列

分区表的维护 - ORA-14402 更新分区关键字列

6ee5639a40442445944d63b514b2dd02.png

在使用分区表时,需要注意的一个问题是,当我们更新分区字段时,可能会遇到如下错误:SQL> update DOM_REAL_CATEGORY_FL set doc_level=101 where doc_level=51;

update DOM_REAL_CATEGORY_FL set doc_level=101 where doc_level=51

*

ERROR at line 1:

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

这个错误的解释是:ORA-14402: updating partition key column would cause a partition change

Cause: An UPDATE statement attempted to change the value of a partition key column causing migration of the row to another partition

Action: Do not attempt to update a partition key column or make sure that the new partition key is within the range containing the old partition key.

为了解决这个问题,可以使用如下命令更改分区表的属性:SQL> alter table DOM_REAL_CATEGORY_FL enable row movement;

Table altered.

更改分区表的分区键值,意味着要删除记录并重新插入一条新的记录,这会引起记录(Record)的移动,记录的Rowid会改变,相关索引需要进行维护。SQL> update DOM_REAL_CATEGORY_FL set doc_level=101 where doc_level=51;

57024 rows updated.

Elapsed: 00:00:34.61

By eygle on 2009-01-14 23:50 |

Comments (0) |

FAQ | 2192 |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值