FAQ
2009-01-14
分区表的维护 - ORA-14402 更新分区关键字列
在使用分区表时,需要注意的一个问题是,当我们更新分区字段时,可能会遇到如下错误:
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
历史上的今天
- 2013-01-14 陈吉平的Oracle职业生涯:兴趣与思考 成败之所系
- 2011-01-14 AWR之:SQL ordered by User I/O Wait Time
- 2010-01-14 《Oracle DBA手记》- 24小时小样到手
- 2008-01-14 中国IT技术精英年会纪事之一
- 2007-01-14 2006 中国ERP市场谁主沉浮?
- 2006-01-14 安装MultiBlog插件 整合发布多个Blog
- 2005-01-14 HRAY纳斯达克的IPO历程
- 2005-01-14 今天参加的Oracle Technology Day