Error when migrating Bitbucket DB from one DBMS to another

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When migrating from Oracle 19c to SQL Server 2019 the following error is seen:

1 Violation of PRIMARY KEY constraint 'pk_AO_5F844E_SVN_MIRROR_MASTER_NODE'. Cannot insert duplicate key in object 'dbo.AO_5F844E_SVN_MIRROR_MASTER'. The duplicate key value is ( ).

Environment

Bitbucket Server/DC 7.19.

Cause

The error happens in an Active Objects table. This table really doesn't exist in the default Bitbucket schema. It is related to a third-party plugin called SVN Mirror for Bitbucket Server.

Solution

Check if the third-party plugin is in use. If it is not, the table may be empty, so simply uninstall the plugin (which will delete the database table) and try the migration again.

If the plugin is in use and the error persists, you may need to contact plugin support.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.