ORA-14400: inserted partition key does not map to any partition
生活随笔
收集整理的這篇文章主要介紹了
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區接受大于最大分區的數據,否則下次忘記加分區,又會報同樣的錯誤
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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: css学习入门篇(1)
- 下一篇: MaterialEditText 控件学