Search notes:

ORA-14402: updating partition key column would cause a partition change

create table tq84_ora_14402 (
  id   number,
  dt   date
)
partition by range (dt) (
  partition part_a values less than (date '2015-01-01'),
  partition part_b values less than (      maxvalue   )
)
-- disable row movement (default?)
;

select row_movement from user_tables
where lower(table_name) = 'tq84_ora_14402';
-- DISABLED

insert into tq84_ora_14402 values (1, date '2014-08-28');
insert into tq84_ora_14402 values (2, date '2021-03-12');

commit;

update tq84_ora_14402 set dt = date '2019-12-07' where id = 2;

-- Provoke an error
-- ORA-14402: updating partition key column would cause a partition change
update tq84_ora_14402 set dt = date '2018-04-21' where id = 1;

alter table tq84_ora_14402 enable row movement;

select row_movement from user_tables
where lower(table_name) = 'tq84_ora_14402';
-- ENABLED

-- Update statement now works:
update tq84_ora_14402 set dt = date '2018-04-21' where id = 1;

drop table tq84_ora_14402 purge;
Github repository Oracle-Patterns, path: /errors/ORA/14402_updating-partition-key-column-would-cause-a-partition-change/show_error.sql

See also

Partitioned tables
Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759473920, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-14402_updating-partition-key-column-would-cause-a-partition-change(76): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78