jira - Duplicate primary key exception MSSQL server 2008 -


i use mssql server 2008 database web application (jira) , few days had inserted values through database . when try add values through ui following exception .

com.atlassian.jira.exception.dataaccessexception: org.ofbiz.core.entity.genericentityexception: while inserting: [genericentity:customfieldoption][id,10815][sequence,7][value,test][customfieldconfig,10400][parentoptionid,null][disabled,n][customfield,10300] (sql exception while executing following:insert dbo.customfieldoption (id, customfield, customfieldconfig, parentoptionid, sequence, customvalue, optiontype, disabled) values (?, ?, ?, ?, ?, ?, ?, ?) (violation of primary key constraint 'pk_customfieldoption'. cannot insert duplicate key in object 'dbo.customfieldoption'. duplicate key value (10815).))

i believe because primary key auto increment value , inserted value through query . can please me . guess resetting autoincrement sequence help.

hope helps! fyi, sql server uses called identity not auto-increment

-- first check value being used dbcc checkident('tablename',noreseed) -- can "reseed" whatever value want.  if use 10815, value used 10816 dbcc checkident('tablename',reseed,10815) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -