加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

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

(2007-01-10 18:47:07)
分类: 环境配置
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区接受大于最大分区的数据,否则下次忘记加分区,又会报同样的错误

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有