Error when migrating Bitbucket DB from one DBMS to another

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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:

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.



Last modified on Jul 5, 2022

Was this helpful?

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