Chyba synchronizace: Cannot insert duplicate key row in object 'dbo.ModulePermissions' with unique index 'IX_ModulePermissions_Rule'

Popis

Během synchronizace může dojít k následující chybě:

--- [HASH: 07BE0BC1031649F27D59FBA790CBA30E] ---
Synchronization failed
eWay.Core.Exceptions.StoreException: Synchronization of items in folder 'ModulePermissions' failed. ---> eWay.Core.Exceptions.StoreException: Cannot save an item with id '25f68083-2cf4-11e8-8d1f-a80ac8be052a' to table 'ModulePermissions' ---> eWay.Core.Exceptions.StoreException: Cannot save item with ID='25f68083-2cf4-11e8-8d1f-a80ac8be052a' to folder ModulePermissions. ---> System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.ModulePermissions' with unique index 'IX_ModulePermissions_Rule'.
   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()
   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 eWay.Core.Data.SynchronizedSqlCommand.<>c__DisplayClass23_0.<ExecuteNonQuery>b__0() in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\eWayShared\Data\SynchronizedSqlCommand.cs:line 160
   at eWay.Core.Data.SqlCommandRepeater.RunSqlCommand(SqlCommand command, SqlCommandDelegate sqlCommand) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\eWayShared\Data\SqlCommandRepeater.cs:line 77
   at eWay.Core.Data.SynchronizedSqlCommand.ExecuteNonQuery() in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\eWayShared\Data\SynchronizedSqlCommand.cs:line 158
   at eWay.Core.MSSQLDataInterface.MSSQLItemStore.SaveItemToDatabase(OutlookItem item) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\MSSQLDataInterface\MSSQLItemStore.cs:line 2415
   --- End of inner exception stack trace ---
   at eWay.Core.MSSQLDataInterface.MSSQLItemStore.SaveItemToDatabase(OutlookItem item) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\MSSQLDataInterface\MSSQLItemStore.cs:line 2422
   at eWay.Core.MSSQLDataInterface.MSSQLItemStore.SaveItem(OutlookItem item) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\MSSQLDataInterface\MSSQLItemStore.cs:line 769
   --- End of inner exception stack trace ---
   at eWay.Core.MSSQLDataInterface.MSSQLItemStore.SaveItem(OutlookItem item) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\MSSQLDataInterface\MSSQLItemStore.cs:line 773
   at eWay.Core.CachedDataInterface.CachedItemStore.SaveItemLocal(OutlookItem oldItem, OutlookItem itemToBeSaved, Nullable`1 serverItem) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\CachedDataInterface\CachedItemStore.cs:line 2602
   at eWay.Core.CachedDataInterface.CachedItemStore.SaveRemoteItemToLocalStore(OutlookItem remoteItem, IOutlookApplication olApplication, Boolean& isNew) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\CachedDataInterface\CachedItemStore.cs:line 1932
   at eWay.Core.CachedDataInterface.CachedItemStore.DownloadItems(IOutlookApplication application, SynchronizationItem synchronizationSetting, DateTime till, Boolean& newData) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\CachedDataInterface\CachedItemStore.cs:line 1557
   --- End of inner exception stack trace ---
   at eWay.Core.CachedDataInterface.CachedItemStore.DownloadItems(IOutlookApplication application, SynchronizationItem synchronizationSetting, DateTime till, Boolean& newData) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\CachedDataInterface\CachedItemStore.cs:line 1637
   at eWay.Core.Synchronization.SynchronizeThread.SynchronizeAll(IEnumerable`1 synchronizationItems, Boolean& synchronizationOK, Boolean& newData, DateTime till, Boolean disableConstraints) in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\eWaySynchronization\SynchronizeThread.cs:line 1354
   at eWay.Core.Synchronization.SynchronizeThread.Synchronize() in C:\CC.NET\Projects\NAnt\Sources\eWayLibrary\eWaySynchronization\SynchronizeThread.cs:line 522
--- END TRACE ---

Verze

Všechny verze eWay-CRM®

Obtížnost řešení

Střední

Postup řešení

Řešením je změna nastavení Synchronized ve Window Registru.

Ve Windows Registru přejděte na adresu:

HKEY_CURRENT_USER\Software\Memos\eWay Outlook Client

Zde je nastavení Synchronized, u něhož je potřeba změnit hodnotu na 0. Pro tuto změnu můžete použít i následující soubor: https://download.eway-crm.com/regfiles/Synchronized.zip. Pokud soubor stáhnete, rozbalíte a spustíte, Synchronized se tím nastaví na 0.

Po změně zápisu v Registru je potřeba restartovat Microsoft Outlook.