Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Error adding comment - Cannot insert duplicate key row in object 'dbo.gemini_watchissues' with uniqu

usage

We seem to be getting the below error intermittently when adding comments on tickets. Do you know what is causing this and how to fix it?

Cannot insert duplicate key row in object 'dbo.geminiwatchissues' with unique index 'uindgeminiwatchissuesid'. The duplicate key value is (3588, 2). The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) at NHibernate.Id.IdentityGenerator.InsertSelectDelegate.ExecuteAndExtract(IDbCommand insert, ISessionImplementor session) at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)

rlevine
· 75
rlevine
Replies (3)
helpful
0
not helpful
ANSWER

P)lease run the following SQL:

UPDATE gemini_watchissues set gemini_watchissues.projectid = gemini_issues.projectid from gemini_watchissues join gemini_issues on gemini_watchissues.issueid=gemini_issues.issueid where gemini_watchissues.projectid!=gemini_issues.projectid

Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

6 rows updated. Thanks.

how does this happen?


rlevine
· 75
rlevine
helpful
0
not helpful

We are think it is to do with moving an item between projects, but cannot reproduce this.


Mark Wing
· 9108
Mark Wing