ORA-00001: unique constraint violated
677729May 14 2010 — edited Oct 29 2010Hi..
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(DatabaseError.java:367)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9119)
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.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
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:-
OWNER INDEX_NAME LAST_ANALYZED
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
is it the problem due to the old data not remove from the all_indexes table ?.. if YES is it I have to delete the old data manually from the all_indexes table ?
Please guide me ?
Thank you
baharin