SYMPTOMS
The following messages are logged at WARNING and ERROR level during User Synchronization phase:
WARN Error synchronizing deleted items: System.Data.SqlClient.SqlException (0x80131904): The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ZyLAB.EDiscovery.Exchange.Standalone.Database.MailboxSyncStateDbRepository.BindUserItemDeletionWithJournalItems(String mailbox)
at ZyLAB.EDiscovery.Exchange.Standalone.ExchangeSync.ExchangeSynchronizer.<>c__DisplayClass2d.<FullSyncUserMailbox>b__2b()
at ZyLAB.EDiscovery.Common.Workflow.Retry.<>c__DisplayClass16.<IfSqlException>b__15()
at ZyLAB.EDiscovery.Common.Workflow.Retry.RetryIfExpectedException[TException,TResult](Func`1 func, Int32 maxAttemptsCount, TimeSpan timeout, Action`2 attemptFailedAction, Action`1 retryFailedAction)
at ZyLAB.EDiscovery.Exchange.Standalone.ExchangeSync.ExchangeSynchronizer.FullSyncUserMailbox(CancellationToken token, String currentAccount, ExchangeSyncHelper exchangeSyncHelper)
ClientConnectionId:xxxx
ERROR "Error during synchronization!: System.Data.SqlClient.SqlException (0x80131904): The MERGE statement attempted to UPDATE or DELETE the same row more than once. This happens when a target row matches more than one source row. A MERGE statement cannot UPDATE/DELETE the same row of the target table multiple times. Refine the ON clause to ensure a target row matches at most one source row, or use the GROUP BY clause to group the source rows.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at ZyLAB.EDiscovery.Exchange.Standalone.Database.MailboxSyncStateDbRepository.BindUserItemDeletionWithJournalItems()
at ZyLAB.EDiscovery.Exchange.Standalone.ExchangeSync.ExchangeSynchronizer.<SynchronizeAll>b__14()
at ZyLAB.EDiscovery.Common.Workflow.Retry.<>c__DisplayClass16.<IfSqlException>b__15()
at ZyLAB.EDiscovery.Common.Workflow.Retry.RetryIfExpectedException[TException,TResult](Func`1 func, Int32 maxAttemptsCount, TimeSpan timeout, Action`2 attemptFailedAction, Action`1 retryFailedAction)
at ZyLAB.EDiscovery.Exchange.Standalone.ExchangeSync.ExchangeSynchronizer.SynchronizeAll(CancellationToken token)
CAUSE
In this instance, this issue is caused by unexpected duplication of items in the journal mailbox.
RESOLUTION
The error is scheduled to be fixed in eDiscovery Bundle version 3.8. Should you need assistance with this issue whilst using eDiscovery Bundle version 3.7 or 3.7 Service Pack 1 you can contact ZyLAB Customer Support.
APPLIES TO
3.7; 3.7 Service Pack 1
Comments
0 comments
Article is closed for comments.