Partition Table maintenance-ORA-14402 updates partition keyword Columns

Source: Internet
Author: User

When using a partition table, you must note that the following error may occur when updating the partition field:

SQL> Update dom_real_category_fl set doc_level = 101 Where doc_level = 51;
Update dom_real_category_fl set doc_level = 101 Where doc_level = 51
*
Error at line 1:
ORA-14402: updating partition key column wocould cause a partition change

 

The error is explained as follows:

ORA-14402: updating partition key column wocould 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 partition key.

 

To solve this problem, you can use the following command to change the attributes of a partition table:

SQL> ALTER TABLE dom_real_category_fl enable row movement;

 

Table altered.

 

Changing the partition key value of the Partition Table means that you want to delete the record and insert a new record. This will lead to the movement of the record. The rowid of the record will change and the related indexes need to be maintained.

SQL> Update dom_real_category_fl set doc_level = 101 Where doc_level = 51;

 

57024 rows updated.

Elapsed: 00:00:34. 61

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.