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區接受大於最大分區的數據,否則下次忘記加分區,又會報同樣的錯誤


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM