首页 > 其他 > 详细

ORA-14400: inserted partition key does not map to any partition

时间:2015-02-02 09:29:51      阅读:536      评论:0      收藏:0      [点我收藏+]
ORA-14400: inserted partition key does not map to any partition
数据库表已经分区,如果插入数据时出现错误提示:
ORA-14400: 插入的分区关键字超出最高合法分区关键字。
原因是因为分区已经过期
解决方法:
手工添加了一个分区,终止日期大于当前日期即可。
建表的SQL:
create table DATE
(
  ID            VARCHAR2(20) not null,
  NEWYEAR   VARCHAR2(20) not null,
  NEWMONTH  VARCHAR2(20) not null,
)
partition by range (NEWYEAR, NEWMONTH)
(
  partition PT_2004_03 values less than (‘2004‘, ‘04‘)
    tablespace TS_LIU
    pctfree 10
    pctused 40
    initrans 1
    maxtrans 255
    storage
    (
      initial 64K
      minextents 1
      maxextents unlimited
    ),
  partition PT_2004_04 values less than (‘2004‘, ‘05‘)
    tablespace TS_LIU
    pctfree 10
    pctused 40
    initrans 1
    maxtrans 255
    storage
    (
      initial 64K
      minextents 1
      maxextents unlimited
    )
)
;
增加分区:
ALTER TABLE "DATE"
     ADD PARTITION "PT_2007_12" 
     VALUES LESS THAN  (‘2007‘, ‘12‘)
     TABLESPACE "TS_LIU"
     pctfree 10
     pctused 40
     initrans 1
     maxtrans 255
     storage
    (
      initial 64K
      minextents 1
      maxextents unlimited
    )
   
另:在建立分区表的时候应该有一个pmin区接受小于最小分区的数据
以及一个pmax区接受大于最大分区的数据,否则下次忘记加分区,又会报同样的错误

ORA-14400: inserted partition key does not map to any partition

原文:http://www.cnblogs.com/diyunpeng/p/4266746.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!