TSService Shows ORA-00001 Unique Constraint Violation Because Sequence Value Not Incrementing
Last updated on FEBRUARY 23, 2018
Applies to:Oracle Utilities Network Management System - Version 1.11.0 and later
Oracle Network Management for Utilities - DMS - Version 1.11.0 and later
Information in this document applies to any platform.
TSService gives unique constraint violation because ID does not increment.
TSService.log contained a large number of errors like:
07/10 11:57:19: 0x7f338bd58700,ctp=0x7f338400f028,"updateData" *ERROR* - sql failed:
result=-1 error='ORA-00001: unique constraint (NMS_TEST_DB.TS_SNAPSHOTS_PK) violated
sql=[INSERT INTO ts_snapshots (id, when) VALUES (:id, SYSDATE)]
07/10 11:57:19: 0x7f338bd58700,ctp=0x7f338400f028,"updateData" OciBatch::writeToDB - error=ORA-00001: unique constraint (NMS_TEST_DB.TS_SNAPSHOTS_PK) violated
[INSERT INTO ts_snapshots (id, when) VALUES (:id, SYSDATE)]
The TS_SNAPSHOTS table only has one record. That record has an ID of 0.
Every insert used 0 as the ID, and therefore violates the PK.
The tablespace was copied from an NMS 1.10 system.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms