Constraint violation in MSSQL when creating review

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Fisheye/Crucible is connected to MSSQL.

Failed to create review for certain commits.

atlassian-fisheye-<date>.log に次のメッセージが表示される。

2014-03-28 05:43:26,267 WARN  [btpool0-66 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - SQL Error: 2627, SQLState: 23000
2014-03-28 05:43:26,268 ERROR [btpool0-66 ] org.hibernate.util.JDBCExceptionReporter JDBCExceptionReporter-logExceptions - Violation of UNIQUE KEY constraint 'UQ__cru_revi__21F7C44C19DFD96B'. Cannot insert duplicate key in object 'dbo.cru_revision'. The duplicate key value is (REPONAME, <pathID>, <COMMIT_HASH>).
2014-03-28 05:43:26,268 ERROR [btpool0-66 ] org.hibernate.event.def.AbstractFlushingEventListener AbstractFlushingEventListener-performExecutions - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not insert: [com.cenqua.crucible.model.CrucibleRevision]

診断

Run the following SQL query in Fisheye/Crucible database:

Select TABLE_NAME, COLUMN_NAME, COLLATION_NAME From INFORMATION_SCHEMA.COLUMNS

Check if there is any collation name with "CI_AS" (CI means Case Insensitive).

原因

Fisheye/Crucible only works with Case Sensitive collation set as stated in Migrating to SQL Server.

ソリューション

  1. Create a new MSSQL database with Latin1_General_CS_AS collation set.
  2. Migrate Fisheye/Crucible to the new database at Administration > System Settings > Database.
最終更新日 2018 年 7 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.