Error: “Cannot insert duplicate key in object 'dbo.HistoryJob'”
说明
Duplicates in JobHistory appear sporadically. If such duplicates exist and historization process is started, the move of data from RawJobHistory to HistoryJob on an HDB fails because of PK constraint violation.
Error:
[810023] Error running statement: exec HDB_PProcessGroup '008FBECF-229B-4059-9D64-6BE2618A0334' [810143] Database error 3903: The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. Violation of PRIMARY KEY constraint 'PK__HistoryJ__789A82F1A6060B6A'. Cannot insert duplicate key in object 'dbo.HistoryJob'. The duplicate key value is (1ea013f1-8bb9-4f67-86d2-1735f2680299). Warning: Null value is eliminated by an aggregate or other SET operation. [System.Data.SqlClient.SqlException] The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. Violation of PRIMARY KEY constraint 'PK__HistoryJ__789A82F1A6060B6A'. Cannot insert duplicate key in object 'dbo.HistoryJob'. The duplicate key value is (1ea013f1-8bb9-4f67-86d2-1735f2680299). Warning: Null value is eliminated by an aggregate or other SET operation. at VI.JobService.ProcessorThread._ExecuteJob(Job job, JobResult result) at HdbTransportComponent.HdbTransportComponent._ExportToHdb() at HdbTransportComponent.HdbTransportComponent._ProcessInDestination(IDbSession outSession, CancellationToken ct) at VI.Base.SyncActions.Do[T](Func`1 function) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadWriteDbSession.d__21.MoveNext() ---- Start of Inner Exception ---- at VI.DB.DataAccess.ReadWriteDbSession.d__21.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadWriteDbSession.d__55`1.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadWriteDbSession.d__22.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadOnlyDbSession.d__107`1.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadOnlyDbSession.d__108`1.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.SafeDbCommand.d__16.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.SafeDbCommand.d__43`1.MoveNext() ---- Start of Inner Exception ---- at VI.DB.DataAccess.SafeDbCommand.d__43`1.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at System.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, String endMethod, Boolean isInternal) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
原因
This is a product defect (438926).
解决办法
WORKAROUND:
None.
STATUS:
This will be fixed in a future release of the product. If you require this immediately corrected, please contact support for a hotfix referencing the defect ID 438926.