We have installed a new History Database in our environment and let the first Transport start with the AutoSchedule.
Before this HistoryDB, we had a HistoryDB that was installed but never used on v8.2.
When the Job autostarts, it throws the following Error message:
(2025-09-10 01:34:03.953) [810143] Database error 2627: Violation of PRIMARY KEY constraint 'PK__SourceTa__90083859A3BC274B'. Cannot insert duplicate key in object 'dbo.SourceTable'. The duplicate key value is (SHR-T-LocalityHasSAPHRP). The statement has been terminated. [System.Data.SqlClient.SqlException] Violation of PRIMARY KEY constraint 'PK__SourceTa__90083859A3BC274B'. Cannot insert duplicate key in object 'dbo.SourceTable'. The duplicate key value is (SHR-T-LocalityHasSAPHRP). The statement has been terminated. at VI.JobService.ProcessorThread._ExecuteJob(Job job, JobResult result) at HdbTransportComponent.HdbTransportComponent._ExportToHdb() at HdbTransportComponent.HdbTransportComponent._MoveDataToHdb(IDbSession inSession, IDbSession outSession, CancellationToken ct) at HdbTransportComponent.HdbTransportComponent._CopyDataToHdb(IDbSession inSession, IDbSession outSession, CancellationToken ct) at HdbTransportComponent.HdbTransportComponent._CreateMetaEntries(IDbSession inSession, IDbSession outSession, CancellationToken ct) at HdbTransportComponent.HdbTransportComponent._CopyEntries(IDbSession inSession, IDbSession outSession, String inSql, String outTable, String[] outColumns, CancellationToken ct) at VI.Base.SyncActions.Do(Func`1 action) 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.<BulkImportAsync>d__29.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.<IgnoreBrokenConnectionAsync>d__56`1.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() --- End of stack trace from previous location where exception was thrown --- at VI.DB.DataAccess.ReadWriteDbSession.<>c__DisplayClass28_0.<<BulkImportAsync>b__0>d.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.PhysicalMsSqlConnection.<BulkImportAsync>d__45.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.PhysicalMsSqlConnection.<_BulkImportDotNet>d__46.MoveNext() ---- Start of Inner Exception ---- at VI.DB.DataAccess.PhysicalMsSqlConnection.<_BulkImportDotNet>d__46.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.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinuedOnSuccess(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source) at System.Data.SqlClient.SqlBulkCopy.RunParser(BulkCopySimpleResultSet bulkCopyHandler) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 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 may be unrelated, but there are also old entries in the table "QBMTransportHistory". Does it make sense to delete old entries here if the former HDB was never used? Could this even be a root cause of the problem above? Everything else is on Default settings and the Database we use right now is created from Scratch with the Configuration Wizard.
Thank you in Advance for your help!