我做了一个大表分区,具体的脚本如下:
create  table  tb_data_history(
id           number(10)     not null,
stationid    number(10)     not null,
deviceid     number(10)     not null,
value        number         not null,
time         date           not null
)pctused 60 pctfree 10  
partition   by  range(time)
(partition  part_1   values  less  than  (to_date('01-06-2004','dd-mm-yyyy'))  tablespace  tb_data_history01,
 partition  part_2   values  less  than  (to_date('01-07-2004','dd-mm-yyyy'))  tablespace  tb_data_history02,
 partition  part_3   values  less  than  (to_date('01-08-2004','dd-mm-yyyy'))  tablespace  tb_data_history03,
 partition  part_4   values  less  than  (to_date('01-09-2004','dd-mm-yyyy'))  tablespace  tb_data_history04,
 partition  part_5   values  less  than  (to_date('01-10-2004','dd-mm-yyyy'))  tablespace  tb_data_history05,
 partition  part_6   values  less  than  (to_date('01-11-2004','dd-mm-yyyy'))  tablespace  tb_data_history06);其中time是这个表的索引,我现在把以前的表里面的数据imp到这个新表里面,当
imp到time为'01-06-2004'至'01-07-2004'的时候,就出现这样的错:
ORA-14400: inserted partition key does not map to any partition
这是咋回事,我看了一下,建的表没错呀,为啥不能匹配??

解决方案 »

  1.   

    我感觉是里面数据有超过to_date('01-11-2004','dd-mm-yyyy')的
      

  2.   

    问题解决了,我就是加了下面:
    partition part_MAX values less than (MAXVALUE) tablespace tb_data_history07这个,
    就开始往part_2里面imp数据了,这个不应该呀,我看了好多资料,没这一说呀,咋回事,呵呵,为啥加了这一行才往part_2里面imp数据,谁说说,说对了,分数照给
      

  3.   

    楼主:
        这句“partition part_MAX values less than (MAXVALUE) tablespace tb_data_history07“是什么意思啊?MAXVALUE的值是多少呢?如果我要再插入一个分区该怎么办呢?如插入小于'01-12-2004'的分区!
    谢谢。