Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim
By default a partitioned table has row movement disabled (ROW_MOVEMENT = DISABLED in USER_TABLES). Then a row cannot leave its partition, and any UPDATE that would move it fails with ORA-14402. The UPDATE is rejected and the row stays as it was.
ALTER TABLE … ENABLE ROW MOVEMENT lets Oracle move the row.
01Correcting a date in a RANGE-partitioned table across a boundary
sales is partitioned by year on sale_date. A sale entered as 2025-12-31 is corrected to 2026-01-02, which belongs in partition p2026, not p2025.
Setup
CREATE TABLE sales (sale_id NUMBER PRIMARY KEY, sale_date DATE, amount NUMBER)
PARTITION BY RANGE (sale_date) (
PARTITION p2025 VALUES LESS THAN (DATE '2026-01-01'),
PARTITION p2026 VALUES LESS THAN (DATE '2027-01-01')
);
INSERT INTO sales VALUES (1, DATE '2025-12-31', 100);
COMMIT;Table created.
1 row created.
Commit complete.UPDATE sales SET sale_date = DATE '2026-01-02' WHERE sale_id = 1;UPDATE sales SET sale_date = DATE '2026-01-02' WHERE sale_id = 1
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
Help: https://docs.oracle.com/error-help/db/ora-14402/SELECT table_name, row_movement FROM user_tables WHERE table_name = 'SALES';TABLE_NAME ROW_MOVE
------------------------------ --------
SALES DISABLED
1 row selected.ALTER TABLE sales ENABLE ROW MOVEMENT;Table altered.USER_TABLES shows ROW_MOVE = DISABLED. After ALTER TABLE sales ENABLE ROW MOVEMENT the same UPDATE works and the row is found in p2026.
UPDATE sales SET sale_date = DATE '2026-01-02' WHERE sale_id = 1;
COMMIT;
SELECT sale_id, sale_date FROM sales PARTITION (p2026);1 row updated.
Commit complete.
SALE_ID SALE_DATE
---------- ------------------
1 02-JAN-26
1 row selected.02Changing a status in a LIST-partitioned table
orders is LIST-partitioned by status: OPEN/HOLD in p_open, CLOSED/CANCEL in p_closed. Closing an order means moving it to the other partition.
Setup
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, status VARCHAR2(10), amount NUMBER)
PARTITION BY LIST (status) (
PARTITION p_open VALUES ('OPEN', 'HOLD'),
PARTITION p_closed VALUES ('CLOSED', 'CANCEL')
);
INSERT INTO orders VALUES (101, 'OPEN', 5000);
COMMIT;Table created.
1 row created.
Commit complete.UPDATE orders SET status = 'CLOSED' WHERE order_id = 101;UPDATE orders SET status = 'CLOSED' WHERE order_id = 101
*
ERROR at line 1:
ORA-14402: updating partition key column would cause a partition change
Help: https://docs.oracle.com/error-help/db/ora-14402/ALTER TABLE orders ENABLE ROW MOVEMENT;Table altered.With ALTER TABLE orders ENABLE ROW MOVEMENT the status change succeeds and order 101 is in p_closed.
UPDATE orders SET status = 'CLOSED' WHERE order_id = 101;
COMMIT;
SELECT order_id, status FROM orders PARTITION (p_closed);1 row updated.
Commit complete.
ORDER_ID STATUS
---------- ------------------------------
101 CLOSED
1 row selected.FAQ
How do I fix ORA-14402?
Run ALTER TABLE <table> ENABLE ROW MOVEMENT, then run the UPDATE again.
How do I check if row movement is enabled?
SELECT table_name, row_movement FROM user_tables WHERE table_name = 'SALES'; shows ENABLED or DISABLED.
Is ENABLE ROW MOVEMENT needed on every partitioned table?
Only on tables where an UPDATE can change the partition key to a value in another partition. Run it once per table; it stays enabled.
Why doesn't every UPDATE of the partition key fail?
Only an UPDATE whose new value belongs in a different partition fails. Changing the key within the same partition's range works.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0