Unique constraint (BAMBOO.SYS_C0011413) violated after Bamboo upgrade
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
Unique constraint error is showing up in the Bamboo logs right after upgrading Bamboo.
Environment
7.2.3
Diagnosis
The following messages can be found in the atlassian-bamboo.log file:
ORA-00001: unique constraint (BAMBOO.VCSPULLREQ_KEYTARGETREPO_IDX) violated
ORA-00001: unique constraint (BAMBOO.SYS_C0011414) violated
ORA-00001: unique constraint (BAMBOO.SYS_C0011412) violated
ORA-00001: unique constraint (BAMBOO.SYS_C0011413) violated
ORA-00001: unique constraint (BAMBOO.SYS_C0011434) violated
Cause
This can be caused due to some database corruption.
Solution
- Stop Bamboo
- Create a database backup
Run the commands below against Bamboo database:
ALTER INDEX BAMBOO.VCSPULLREQ_KEYTARGETREPO_IDX REBUILD; ALTER INDEX BAMBOO.SYS_C0011414 REBUILD; ALTER INDEX BAMBOO.SYS_C0011412 REBUILD; ALTER INDEX BAMBOO.SYS_C0011413 REBUILD; ALTER INDEX BAMBOO.SYS_C0011434 REBUILD;
- Start Bamboo back