Issue Operations are Failed by the PK Violation of Database

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptom

Unable to do any action on issue, including Edit, Assign, Transit... along with the Primary Key Violation Exception thrown in log file.

SQL Exception while executing the following:
  INSERT INTO ***.changegroup (ID, issueid, AUTHOR, CREATED) VALUES (?, ?, ?, ?) (***: unique constraint (***.PK_CHANGEGROUP) violated )

Cause

The cause is the dis-synchronization between the sequence setting and seq_id of changegroup table, which may relate to the incomplete transaction triggered by database connection failure.

Workaround


Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Run the following SQL in your JIRA database to synchronize sequence setting for changegroup

          update SEQUENCE_VALUE_ITEM SET seq_id = (select max(ID) from changegroup) + 10 where seq_name='ChangeGroup'
  2. Restart JIRA.

Last modified on Sep 8, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.