none
Violation of PRIMARY KEY constraint 'PK_LastProcessedItemVersions'. Cannot insert duplicate key in object 'dbo.LAST_PROCESSED_ITEM_VERSIONS'.

    Domanda

  • While running my migration I am getting this conflict. 

     

    What can I do to resolve it?

     

    Microsoft.TeamFoundation.Migration.Toolkit.ErrorManagement.MissingErrorRouterException: 
    Runtime error does not meet the error routine policy and there is no conflict manager to log a conflict.
    ---> System.Data.UpdateException: An error occurred while updating the entries. See the InnerException for details.
    ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_LastProcessedItemVersions'.
    Cannot insert duplicate key in object 'dbo.LAST_PROCESSED_ITEM_VERSIONS'.
    The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.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.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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) --- End of inner exception stack trace --- at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave) at Microsoft.TeamFoundation.Migration.EntityModel.RuntimeEntityModel.TrySaveChanges() at Microsoft.TeamFoundation.Migration.Toolkit.WIT.WITTranslationService.UpdateLastProcessedItemVersion(Dictionary`2 itemVersionPair, Int64 lastChangeGroupId, Guid sourceId) at Microsoft.TeamFoundation.Migration.Tfs2008WitAdapter.TfsWITAnalysisProvider.UpdateProcessedRev(Int32 wiId, Int32 rev) at Microsoft.TeamFoundation.Migration.Tfs2008WitAdapter.TfsWITAnalysisProvider.SaveDeltaEntries(List`1 changeGroups) at Microsoft.TeamFoundation.Migration.Tfs2008WitAdapter.TfsWITAnalysisProvider.GenerateNextDeltaSlice(Int32 maxDeltaSliceSize) at Microsoft.TeamFoundation.Migration.Tfs2008WitAdapter.TfsWITAnalysisProvider.GenerateDeltaTable() --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Migration.Toolkit.ErrorManagement.ErrorRoutingAlgorithm.TryHandleException(Exception e, ConflictManager conflictManager) at Microsoft.TeamFoundation.Migration.Toolkit.ErrorManagement.ErrorManager.TryHandleException(Exception e, ConflictManager conflictManager) at Microsoft.TeamFoundation.Migration.Toolkit.ErrorManagement.ErrorManager.TryHandleException(Exception e) at Microsoft.TeamFoundation.Migration.Tfs2008WitAdapter.TfsWITAnalysisProvider.GenerateDeltaTable() at Microsoft.TeamFoundation.Migration.Toolkit.AnalysisEngine.GenerateDeltaTables(Guid sourceId)

     

    domenica 6 febbraio 2011 17:07

Tutte le risposte