ORA-00001: unique constraint violated is not necessarily a primary key conflict

Source: Internet
Author: User

Link: http://blog.163.com/jet_it_life/blog/static/205097083201301410303931/

Original article content:

A tester raise's Jira received a ORA-00001: unique constraint violated error in a table that could not insert data, but checked it carefully and no duplicate data was found, let me help you to check what the problem is.
An error occurs only because of data conflicts. However, it is strange that the violation constraint prompted in the error is an index, which is not the only index! After dropping this index, the ORA-00001 still exists, but this time I changed an index! This index is still not the only index! Then drop the index and then insert it. The nature of the problem is exposed:
Error at line 1:
ORA-00600: Internal error code, arguments: [6002], [0], [227], [2], [0], [], [], [], []
600 error. It may be that the index data of the table or table has bad blocks or the index structure of the table or table has problems. Try the structure of the analysis table and index:
SQL> analyze table #. # validate Structure Cascade;
Analyze table #. # validate Structure Cascade
*
Error at line 1:
ORA-01499: Table/index cross reference failure-see trace file
You can basically determine the table structure and its indexes, and try to recreate the table and related indexes:
SQL> ALTER TABLE #. # move;


Table altered.
SQL> alter index #. # rebuild;


Index altered.
...
After the table and index are rebuilt, the insert operation is successful.

In recent days, also encountered an oracle ORA-00001 exception, query the data in the table, there is no conflict with the primary key, that is, occasionally Save the data will be wrong, temporarily did not find the reason, first mark

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.