Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 
 

ORA-00001: unique constraint (string.string) violated tips

Oracle Error Tips by Burleson Consulting

 

Oracle docs note this action when you get a ORA-00001 error:

ORA-00001: unique constraint (string.string) violated

Cause: An UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.

Action: Either remove the unique restriction or do not insert the key.

New Tip!  The 11gr2 hint ignore_row_on_dupkey_index allows the statement to silently ignore ORA-00001 errors.   See my ignore_row_on_dupkey_index tips.


On this forum, a user has also been confronts by ORA-0001, receiving this message:

08/07/2004 05:15:42 PM: <ERR> MOD=400; LINE=103; ERRNO=LC:12325,1;

ERRMSG=Error: ORA-00001: unique constraint (PMS.SUBPROJACT_PK) violated, Connector 'oracle', Method -Update- (1);

DEVL_PLAN_CODE=8; VOT_HEAD_CODE=21; PROG_CODE=02601; PROJ_SERI_NUMB=512; SUB_PROJ_SERI_NUMB=1000; ACVT_CATG=Perkhidmatan; NOTES_UNID=AAD291216DF60FF348256D060012FB17;:;

It is noted here that ORA-00001 is common when: "a program tries to insert a "duplicate" row in a table,"  and that, "when a unique constraint is violated the row is NOT added to the table."


Also, ORA-0001 is addressed on this great blog

Here, it is explained that using a trigger method might help avoid ORA-00001  in that it does not allow duplicate primary keys.  This is because if you have a sequence with in an insert statement, an insert that lacks a sequence would cause ORA-00001 to be thrown.  Here is the scenario presented by Sam Stephens: 

Lets say you have one row in your table, with ID = 1. Someone decides they need to have a record with ID = 10, and so they insert using insert into table (id) values (10). You now have a ticking timebomb - the sequence will continue to increment 2, 3 etc, until it reaches 10 at which time the insert fails with

ERROR at line 1:

ORA-00001: unique constraint (SYS.SYS_C002948) violated

Conversely, a trigger method would overwrite a value from an explicit ID value using a value specified in the sequence instead. 


Many users experience ORA-00001.  Upon truncating MTL_REVISIONS_INTERFACE will take care of ORA-00001 by using the instructions below:

  1. Create table backup_<tarno> as select * from MTL_REVISIONS_INTERFACE
  2. Truncate table MTL_REVISIONS_INTERFACE
  3. Resubmit item for item import

 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright ? 1996 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.


��  
 
 
 
 

 
 
 

 
 
Oracle performance tuning software 
 
oracle dba poster
Oracle Linux poster