TSService Shows ORA-00001 Unique Constraint Violation Because Sequence Value Not Incrementing (Doc ID 2036246.1)

Last updated on NOVEMBER 04, 2016

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.

Symptoms

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)]
  host_vars=[{
  :id:0
}]
07/10 11:57:19: 0x7f338bd58700,ctp=0x7f338400f028,"updateData" OciBatch::writeToDB - error=ORA-00001: unique constraint (NMS_TEST_DB.TS_SNAPSHOTS_PK) violated
 sql=
  [INSERT INTO ts_snapshots (id, when) VALUES (:id, SYSDATE)]
{
  :id:0
}


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.

Changes

The tablespace was copied from an NMS 1.10 system.

Cause

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