Jira Database does not autoincrement remotelink primary key

Hey guys,

i tried to insert multiple remotelinks for a few thousand issue via database.

Everything worked fine, when i started Jira and checked the issues, each one has a correct working web link.

But now, when i try to create new web links out of jira, i get DataAccessExeption with the message that there is a duplicate entry for remotelink id 10000.

I know that remotelink id 10000 is the first starting id. So i started my inserted remotelinks with 10000. In database i now have remotelinks with ids from 10000 to 15000.

How can i tell jira to use 15001 as next remotelinkid and not 10000? so that i avoid duplicate entry error?

P.S. Reindexing didnt work. Also i could not find any information in database why jira wanna use the 10000 as next id.

1 answer

1 accepted

2 votes
Accepted answer

You should *never* mess with an Atlassian database if you don't understand it in full.

I would go back to the backup you took before you did this, as you could now have corrupted quite a lot of things across your instance.

I totally accept your answer even if its not answering my question.

I made changes in database before i totally know whats the consequences.

But just as information for people that are like me, ive found a solution.
In the Jira Development Docs i found information about the database-schema and the sequence_value_item table. didnt recognized that before cause its "hidden".  docs say the following:


The SEQUENCE_VALUE_ITEM table is used to record, in a database independent way, the maximum ID used in each of JIRA's database tables

The implication of this is that if you want to manually insert records into JIRA database tables, you must update SEQUENCE_VALUE_ITEM yourself. Set the relevant rows' SEQ_ID values to a value greater than the actual maximum ID in the table. You will then need to restart JIRA to ensure all database caches are reset.

So i had to update the value for "RemoteIssueLink" and now everything is working fine.

And the other things you might have damaged?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,082 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you