none
Sync exception " Exception: Cannot enumerate changes at the RelationalSyncProvider for table 'RBOTRANSACTIONSALESTRANS' at Microsoft.Synchronization.Data.DbSyncBatchProducer.DequeueBatc" RRS feed

  • Question

  • Does any body know the exception:

    Sync Result - Exception: Cannot enumerate changes at the RelationalSyncProvider for table 'RBOTRANSACTIONSALESTRANS'.  Check the inner exception for any store-specific errors. =====>    at Microsoft.Synchronization.Data.DbSyncBatchProducer.DequeueBatch()

       at Microsoft.Synchronization.Data.RelationalSyncProvider.ConsumeBatchFromProducer(DbSyncScopeMetadata scopeMetadata)

       at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChanges(DbSyncScopeMetadata scopeMetadata, DbSyncSession DbSyncSession, UInt32 memoryBatchSize)

       at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever)

       at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever)

       at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)

       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)

       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)

       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()

       at Microsoft.Synchronization.SyncOrchestrator.Synchronize()

       at ROWPOS.DataCenter.DataSyncEngine.DataSyncOrchestrator.Synchronize(), Scope: TransactionBusinessData

    Thanks

    Monday, April 9, 2012 8:09 AM

Answers

  • The issue is solved,

    When execute the SP "*_selectchanges", timeout was happened,  increase the timeout value will solve the problem in sync framework 2.1.

    The inner trace for the exception:

    RelationalSyncProvider.BatchedEnum: Caught exception while enumerating changes
    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       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.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Microsoft.Synchronization.Data.RelationalSyncProvider.EnumerateChangesInBatchesInternal(Object batchProducer)

    6:52:15 AM 843       ERROR  , ROWPOS.ConnectionPoints.DataCenterP2P, 4, 05/14/2012 22:52:15:843,       RelationalSyncProvider.BatchedEnum: Background thread had an unexpected exception. Queue it.


    Get reply from social.microsoft

    • Marked as answer by Abby.Tang Wednesday, May 16, 2012 2:08 PM
    Wednesday, May 16, 2012 2:08 PM

All replies

  • try enabling Sync Framework tracing in verbose mode so you can get more information on the error...
    Tuesday, April 10, 2012 1:52 AM
    Moderator
  • Thanks for your reply, I have asked the supporter to enable the Sync inner trace on site.

    But first I would like to know how can I reproduce it in our lab, do you have any idea on it?

    Regards,

    Tuesday, April 10, 2012 4:22 AM
  • try deleting a batch file from the batching directory while synching...

    Tuesday, April 10, 2012 8:43 AM
    Moderator
  • June, thank you very much for reply,

    I tried to delete a batch file while synchronizing,

    But I got different exception messages,

    Sync Result - Exception: An unexpected error occurred when applying batch file c:\SyncBatch\sync_48d62d931c8344bf802117551b9f35907fe38f5c7810410696c2fa728a2634c5\5b07128a-39bb-47a0-b385-364e6fc7b55b.batch. See the inner exception for more details. =====>    at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)
       at Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics)
       at Microsoft.Synchronization.KnowledgeProviderProxy.ProcessChangeBatch(CONFLICT_RESOLUTION_POLICY resolutionPolicy, ISyncChangeBatch pSourceChangeManager, Object pUnkDataRetriever, ISyncCallback pCallback, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
       at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
       at Microsoft.Synchronization.SyncOrchestrator.Synchronize()
       at ROWPOS.DataCenter.DataSyncEngine.DataSyncOrchestrator.Synchronize(), Scope: TransactionBusinessData

    I just got the message from inner trace with verbose:

    Rolling back application transaction

    For handle this exception, I need to delete the batch folder to resolve the exception, or the exception will be happened again and again.


    Get reply from social.microsoft

    Thursday, April 12, 2012 6:02 AM
  • what else did you get on the trace before the rollback transaction message?

    in practice, you should really be doing housekeeping on the batch directory coz sometimes it doesnt get cleanup, more specially if you're using WCF.

    Thursday, April 12, 2012 6:26 AM
    Moderator
  • Thanks for your reply

    Nothing I got before the rollback transaction message.

    For now, I am just  wait for the inner trace from realy site, because I cannot reproduce the exception here for the exception message:

    " Exception: Cannot enumerate changes at the RelationalSyncProvider for table 'RBOTRANSACTIONSALESTRANS' at Microsoft.Synchronization.Data.DbSyncBatchProducer.DequeueBatch"


    Get reply from social.microsoft

    Thursday, April 12, 2012 2:17 PM
  • The issue is solved,

    When execute the SP "*_selectchanges", timeout was happened,  increase the timeout value will solve the problem in sync framework 2.1.

    The inner trace for the exception:

    RelationalSyncProvider.BatchedEnum: Caught exception while enumerating changes
    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       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.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Microsoft.Synchronization.Data.RelationalSyncProvider.EnumerateChangesInBatchesInternal(Object batchProducer)

    6:52:15 AM 843       ERROR  , ROWPOS.ConnectionPoints.DataCenterP2P, 4, 05/14/2012 22:52:15:843,       RelationalSyncProvider.BatchedEnum: Background thread had an unexpected exception. Queue it.


    Get reply from social.microsoft

    • Marked as answer by Abby.Tang Wednesday, May 16, 2012 2:08 PM
    Wednesday, May 16, 2012 2:08 PM
  • I received the same error message (cannot enumerate changes ...  caused by a timeout exception) from a user, but I cannot reproduce it in my own environment.

    I would like to try if increasing the timeout value helps to solve this error, but I don't know where I can set a new timeout value. Any idea?


    UPDATE: I think I found it in the code for the Sync Framework Toolkit, where the SqlSyncProvider is created, and I added code to set a higher CommandTimeout value there.  I hope this will solve the error.
    • Edited by Joris Z Wednesday, September 16, 2015 8:22 AM
    Wednesday, September 16, 2015 7:41 AM
  • If anyone comes across this. Consider making sure your columns are indexed properly, especially if you're adding joins in your filter configuration
    Friday, April 5, 2019 8:20 PM