Identity column not created when migrating from internal DB to sqlserver

David Montplaisir March 19, 2018

Hi, three weeks ago we migrated our jira installation to sql server and issues are now surfacing.

After some investigations, the ID fields are not identity anymore which is causing some problems when attempting to create most of the data required by jira.

ie: keeping us from creating projects.

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'ID', table 'Jira.AO_B9A0F0_APPLIED_TEMPLATE'; column does not allow nulls. INSERT fails.

is there any way i can backup my data, recreate the tables and then re-import the data without losing everything?

Thank you.

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

Hi David,

It sounds like you might be encountering the same kind of error explained in the KB "Cannot insert the value NULL into column 'ID', table 'xxxxx'; column does not allow nulls. INSERT fails".

I would recommend walking through that KB, and making sure that your MS SQL database is setup correctly with the SET NOCOUNT option unchecked for this database.

There are other steps you can take in that KB, but I would recommend that you create backups as you go.  The changes stated in that KB should allow you to correct this problem.  If you have multiple tables effected by this, then the steps at the bottom indicate a way that you can alter the activeobjects.xml file in the XML backup zip in order to try to correct this.

David Montplaisir March 20, 2018

Hi,

thank you for your reply.

The xml modification seems to have done the trick.

fyi: i had to readjust two tables.

those tables are using nvarchar type as ID.

the table activity_entity seems to be using activity_id as identity

AO_21F425_MESSAGE_AO
AO_563AEE_ACTIVITY_ENTITY

Thank you.

Suggest an answer

Log in or Sign up to answer