zoukankan      html  css  js  c++  java
  • ORA-14400: inserted partition key does not map to any partition

    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区接受大于最大分区的数据,否则下次忘记加分区,又会报同样的错误
  • 相关阅读:
    Redis5排序
    Redis5 常用命令
    Redis5事务 和Watch
    PHP7 ini 配置大全
    PHP 开发者大会
    go and git 代理
    laravel 记录sql语句
    Vue,laravel , laravels 项目在nginx 配置文件
    python selenium right click on an href and choose Save link as... on Chrome.
    selenium借助AutoIt识别上传(下载)详解
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/4266746.html
Copyright © 2011-2022 走看看