Tuesday, 22 August 2017

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


Error:

SQL Error: ORA-14402: updating partition key column would cause a partition change
14402. 00000 -  "updating partition key column would cause a partition change"
*Cause:    An UPDATE statement attempted to change the value of a partition
           key column causing migration of the row to another partition
*Action:   Do not attempt to update a partition key column or make sure that
           the new partition key is within the range containing the old


Solution :

 ALTER TABLE <table name> ENABLE ROW MOVEMENT;


Example:

select * from part_table;

CREATE TABLE part_table (ID NUMBER)
    PARTITION BY RANGE (ID)
      (partition p0 values less than (1),
        PARTITION p1 VALUES LESS THAN (MAXVALUE));

insert into part_table values (0);

UPDATE part_table SET ID = 2;

when you try to update this partition column it gives you ORA-14402.

By default ROW MOVEMENT is DISABLE.

you should alter your table to enable the row movement.

ALTER TABLE part_table ENABLE ROW MOVEMENT;





Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...