It is an older article and it's assuming the year is 2015. Change the script so partitions look like this: Show
The whole script should look like this:
This is because of this:
SYSDATE will be inserted into tab1_part_2017 and ADD_MONTHS(SYSDATE, 12) will be inserted into tab1_part_2018 and you will get equal number of rows in both partitions (50000 in each to be exact). Error Cause Solution You can check partition of table with its range value with following Query: PARTITION_NAME HIGH_VALUE -------------- -------------------------------------------------------------------------------- P3 TO_DATE(' 2020-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA P2 TO_DATE(' 2020-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA P1 TO_DATE(' 2020-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIA For More Detail regarding Parttion
table, use following query: Fix ORA-14400: inserted partition key does not map to any partition_____________________________________________________________________________________________________________________ Problem description: Insert to a partitioned table from the application is getting failed with following error message. java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition Solution Description First of you have to check whether in your partitioned table has a default partition. Default partition means all the records which are not belongs to any of the other partition will get inserted into the default partition. The range will be specified with a limit of MAXVALUE. If this partition did not belong to your table, you will have to add the partition using alter tablecommand. ALTER TABLE “MED_AUD_DOC" ADD PARTITION "P_DEFAULT" VALUES LESS THAN (MAXVALUE) STORAGE( BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TAB_MED_2XL" LOB ("DOCUMENT") STORE AS SECUREFILE ( TABLESPACE "LOB_MEDI_2XL" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION NONE CACHE NOCOMPRESS DEDUPLICATE LOB STORAGE( BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ; Try it _____________________________________________________________________________________________________________________ Website StatsHow do I fix Ora 14400 inserted partition key does not map to any partition?So to fix it , add another partition, with high_value greater than the value which we are trying to insert. SQL> alter table RANGE_TAB add partition p4 values less than (to_date('01042016′,'ddmmyyyy')); SQL> insert into RANGE_TAB values(to_date('24032016′,'ddmmyyyy'),100);
Can we add partition existing table in Oracle?Use the ALTER TABLE ADD PARTITION statement to add a new partition to the "high" end (the point after the last existing partition). To add a partition at the beginning or in the middle of a table, use the SPLIT PARTITION clause.
|