Oracle problems
ORA-14400: Inserted Partition Key Does Not Map to Any Partition. The Fix, and the Date It Happens Again
2 November 2026
ORA-14400 is the error that arrives at midnight on the first of the month, or the first of the year, when the orders table has no partition for the new date. Nothing is broken, nothing is full. The partition that somebody meant to add was never added, and every insert fails until it is.
What the error says
ORA-14400: inserted partition key does not map to any partition. The table is range partitioned, usually by a date, and the row's key is above the high value of the last partition. There is no MAXVALUE partition to catch it, and the table is not interval partitioned, so Oracle has nowhere to put the row.
It is rarely a surprise in the data. A table partitioned by month with partitions up to December has a date in its definition from the day the last partition was created, and that date is a deadline anyone could have read.
Every table and the date it stops
HIGH_VALUE in DBA_TAB_PARTITIONS is a LONG column that holds an expression, so a plain query cannot compare it with today. A small block can:
SET SERVEROUTPUT ON
DECLARE
v_high VARCHAR2(4000);
v_date DATE;
BEGIN
FOR t IN (SELECT p.table_owner, p.table_name, p.partition_name,
p.high_value
FROM dba_tab_partitions p
JOIN dba_part_tables pt
ON pt.owner = p.table_owner
AND pt.table_name = p.table_name
WHERE pt.partitioning_type = 'RANGE'
AND pt.interval IS NULL
AND p.table_owner NOT IN ('SYS', 'SYSTEM')
AND p.partition_position =
(SELECT MAX(partition_position)
FROM dba_tab_partitions
WHERE table_owner = p.table_owner
AND table_name = p.table_name))
LOOP
v_high := t.high_value;
IF v_high <> 'MAXVALUE' THEN
BEGIN
EXECUTE IMMEDIATE 'SELECT ' || v_high || ' FROM dual'
INTO v_date;
DBMS_OUTPUT.PUT_LINE(
RPAD(t.table_owner || '.' || t.table_name, 45)
|| TO_CHAR(v_date, 'YYYY-MM-DD') || ' '
|| ROUND(v_date - SYSDATE) || ' days left');
EXCEPTION
WHEN OTHERS THEN NULL; -- not a date key
END;
END IF;
END LOOP;
END;
/
Tables partitioned by a number instead of a date fall into the exception and stay silent; for those, compare the high value with the current maximum of the key by hand. A table whose last partition is MAXVALUE never raises the error, but it has a different problem, below.
Fix it, in this order
- Add the partition, now. A new partition is metadata: no data moves, no index is rebuilt, inserts continue the moment it exists:
Local indexes get their partition with it. Global indexes stay valid.ALTER TABLE app.orders ADD PARTITION orders_2027_01 VALUES LESS THAN (DATE '2027-02-01'); - Let Oracle add them: interval partitioning. One statement, and the table creates a partition for each new month by itself:
The key must be one DATE, TIMESTAMP or NUMBER column, the table may not have a MAXVALUE partition, and the new partitions get names such asALTER TABLE app.orders SET INTERVAL (NUMTOYMINTERVAL(1, 'MONTH'));SYS_P4711, which you can rename. Old partitions still have to be dropped or archived by you. - A MAXVALUE partition as a safety net, if the table cannot be interval partitioned: rows above the last partition land there instead of failing. The trap is that it then fills for months, and splitting it later is the maintenance work you avoided, with the data in it. Watch it.
- A job that adds partitions ahead. The usual answer, and the usual thing that stops when the person who wrote it leaves. If you keep it, keep it at least a quarter ahead, and let something check that it ran.
See it coming
The date is in the dictionary. Radar Engine, the detection layer of Scops, reads the last partition of every range-partitioned table once a day and turns it into a countdown:
| Detector | Clock | When it fires |
|---|---|---|
| Partitions of a table running out | Daily. The last range partition of a table that is not kept ahead | 21 days: Warning. 7 days, or passed with ORA-14400: Critical. Else Watch. |
| MAXVALUE partition in use | Daily | Rows in the MAXVALUE partition: Watch. For 7 to 31 days and growing: Warning. |
A table whose partitions are added every month by a job never fires, because its last partition is always ahead. A table whose job stopped in September fires in October, three weeks before the error.
Questions
Why did it fail exactly at midnight?
The last partition's high value is a date, usually the first of a month or a year. The first insert with a key at or beyond that date has no partition, and that is the first insert after midnight.
Does adding a partition need downtime?
No. ADD PARTITION changes the dictionary only; inserts work the moment it exists, and global indexes stay valid. SPLIT and DROP are the ones that may need UPDATE INDEXES.
Does interval partitioning fix it for good?
For inserts, yes: Oracle creates each new partition as needed. You still drop or archive the old ones yourself, the partition names are system generated, and a table with a MAXVALUE partition must lose it first.
Is a MAXVALUE partition a good idea?
As a safety net, with something that watches it. Without that, it collects months of rows that later have to be split out, with the data in place.
Related problems
- Invalid objects and unusable indexes
- Sequence exceeds MAXVALUE: ORA-08004
- Tablespace full: ORA-01653
- All Oracle problems
Sources
- Oracle: ORA-14400
- Oracle: DBA_TAB_PARTITIONS, Maintaining Partitions
- Scops docs: Detector reference, Archiving