eygle.com   eygle.com
eygle.com  
 

« xmldom.setCharset无效问题的解决 | Blog首页 | Oracle Database 10g 与 DBA 2.0的时代 »

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

作者:eygle |【转载时请以超链接形式标明文章和作者信息及本声明
链接:

在使用分区表时,需要注意的一个问题是,当我们更新分区字段时,可能会遇到如下错误:

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



历史上的今天...
      >> 2008-01-14文章:
             中国IT技术精英年会纪事之一
      >> 2007-01-14文章:
             2006 中国ERP市场谁主沉浮?
      >> 2006-01-14文章:
      >> 2005-01-14文章:
             HRAY纳斯达克的IPO历程
             今天参加的Oracle Technology Day
------
这篇 【分区表的维护 - ORA-14402 更新分区关键字列】来自 eygle.com | CSDN网摘| del.icio.us|Google订阅 | 鲜果订阅 | 抓虾订阅

By eygle on 2009-01-14 23:50 | Comments (0) | Posted to FAQ | Edit |

相关文章 随机文章
  • 使用errorstack跟踪ORA-01438错误
  • ORA-01157 - Mount状态下的文件存在性校验
  • 使用DATAPUMP导致ORA-00600 17020错误
  • Oracle如何维护SMON_SCN_TIME表?
  • ORA-01114、ORA-27067错误案例一则
  • 如何启用Oracle10g闪回数据库特性
    微软老矣 尚能变否?
    参加EMC Forum 2005-加速信息生命周期管理大会
    Oracle Database 12g将不支持裸设备
    《循序渐进Oracle》勘误表
    搜索本站:

    留言 (0)

    发表留言:



    Remember Me?
    (输入验证码后方可评论,谢谢支持)



    CopyRight © 2004~2010 eygle.com, All rights reserved.