Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009

    Unanswered: ORA-00001: unique constraint violated


    I have faced an error as below:-
    1 : 23000 : java.sql.BatchUpdateException: ORA-00001: unique constraint (SDS1.PK_EXP_TXT) violated
    1 : 23000 : java.sql.SQLException: ORA-00001: unique constraint (SDS1.PK_EXP_TXT) violated
    java.sql.BatchUpdateException: ORA-00001: unique constraint (SDS1.PK_EXP_TXT) violated
    	at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(
    	at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(
    	at com.sunopsis.sql.SnpsQuery.executeBatch(Unknown Source)
    	at com.sunopsis.dwg.dbobj.SnpExpTxt.setString(Unknown Source)
    	at com.sunopsis.dwg.dbobj.SnpSession.saveText(Unknown Source)
    	at com.sunopsis.dwg.dbobj.SnpSession.updateSession(Unknown Source)
    	at com.sunopsis.dwg.dbobj.SnpSession.treatSessionPreTrt(Unknown Source)
    	at com.sunopsis.dwg.dbobj.SnpSession.treatSession(Unknown Source)
    	at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(Unknown Source)
    	at com.sunopsis.dwg.cmd.DwgCommandBase.execute(Unknown Source)
    	at com.sunopsis.dwg.cmd.e.i(Unknown Source)
    	at com.sunopsis.dwg.cmd.g.y(Unknown Source)
    	at com.sunopsis.dwg.cmd.e****n(Unknown Source)
    	at java.lang.Thread****n(
    After i check data in all_indexes table, i have found some old data which are belongs to 2008 and 2009. The sample as below:-
    SDS1	PK_ACTION	   31-OCT-09 07:04:49
    SDS1	AK_ACTION	   31-OCT-09 07:04:49
    SDS1	PK_COND	                31-OCT-09 07:04:50
    SDS1	AK_COND	                31-OCT-09 07:04:50
    SDS1	COND_FK1	   31-OCT-09 07:04:50
    SDS1	COND_FK2	   31-OCT-09 07:04:50
    Based on the error message how could i know what is the error table name and what is the duplicate unique key on the error table ?.

    Please help me how to solved the problem and how could i avoid the problem ?

    Please guide me ?

    Thank you

  2. #2
    Join Date
    Jul 2003
    that's not old data. oracle is showing you the last time your indexes were analyzed.
    the error is very simple. you are attempting to insert a duplicate into EXP_TXT based on the columns that encompass the primary key (unique identifier).

    Basically, determine what columns encompass the primary key for that table to determine what data is a duplicate. OR, have java spit out the offending insert/update statement.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts