Oracle Partition - error ORA14400 - the inserted partition key does not map to any partition

I'm trying to insert information into a partition table, but I don't know what I'm doing wrong! Show me this error: ORA-14400: inserted partition key does not map to any partition "

The dba_tab_partitions table shows the following information:

 1 PDIA_98_20091023 0 2 PDIA_98_20091022 0 3 PDIA_98_20091021 0 4 PDIA_98_20091020 0 5 PDIA_98_20091019 0 

Please help me rs

+7
oracle database-partitioning
source share
1 answer
 select partition_name,column_name,high_value,partition_position from ALL_TAB_PARTITIONS a , ALL_PART_KEY_COLUMNS b where table_name='YOUR_TABLE' and a.table_name = b.name; 

This query specifies the column name, which is used as a key and valid values. make sure you enter valid values ​​( high_value ). Otherwise, if the default partition is specified, it will be there.


EDIT:

I suppose your TABLE DDL will be like that.

 CREATE TABLE HE0_DT_INF_INTERFAZ_MES ( COD_PAIS NUMBER, FEC_DATA NUMBER, INTERFAZ VARCHAR2(100) ) partition BY RANGE(COD_PAIS, FEC_DATA) ( PARTITION PDIA_98_20091023 VALUES LESS THAN (98,20091024) ); 

This means that I created a section with several columns that contains a value less than the compound range (98,20091024);

This is the first COD_PAIS <= 98 and also FEC_DATA < 20091024

Combinations and result:

 98, 20091024 FAIL 98, 20091023 PASS 99, ******** FAIL 97, ******** PASS < 98, ******** PASS 

So, below the INSERT ORA-14400 does not work; because (98,20091024) in INSERT is equal to EQUAL for a unit in DDL , but no less.

 SQL> INSERT INTO HE0_DT_INF_INTERFAZ_MES(COD_PAIS, FEC_DATA, INTERFAZ) VALUES(98, 20091024, 'CTA'); 2 INSERT INTO HE0_DT_INF_INTERFAZ_MES(COD_PAIS, FEC_DATA, INTERFAZ) * ERROR at line 1: ORA-14400: inserted partition key does not map to any partition 

But we try ( 97 , 20091024), it goes through

 SQL> INSERT INTO HE0_DT_INF_INTERFAZ_MES(COD_PAIS, FEC_DATA, INTERFAZ) 2 VALUES(97, 20091024, 'CTA'); 1 row created. 
+15
source share

All Articles