Issue with Ms.Sync framework 2.0 and managed driver RRS feed

  • Question

  • Hi,

    We have been using Ms.Sync framework 2.0 and Oracle ODP.NET Umanaged driver to sync data with Oracle database.

    Now, we moved to ODP.NET, Managed driver.

    The synchronization fails with this error when we call RelationalSyncProvider.ProcessChangeBatch.

    Do you have any ideas?

    We contacted Oracle in below thread and provide the trace log. After reviewing, they suggest us to contact Microsoft.

    Thanks very much.


    System.ObjectDisposedException was unhandled by user code


      Message=Cannot access a disposed object.

    Object name: 'OracleCommand'.




           at Oracle.ManagedDataAccess.Client.OracleCommand.set_Connection(OracleConnection value)

           at Oracle.ManagedDataAccess.Client.OracleCommand.set_DbConnection(DbConnection value)

           at Microsoft.Synchronization.Data.DbSyncScopeHandler.ReadScope(IDbConnection connection, IDbTransaction transaction, ReadKnowledgeType readType, ReadForgottenKnowledgeType readFKtype)

           at Microsoft.Synchronization.Data.RelationalSyncProvider.InitializeChangeApplicationTransaction()

           at Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.PrepareForApplyOrRetry(DataSet ds)

           at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession dbSyncSession, Boolean commitTransaction)

           at Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics)

    Monday, June 25, 2018 4:49 AM

All replies

  • I'd like to add that our OracleDbSyncProvider code is listed below and basically originated from this article:


    /// <summary>
        /// Derived DbSyncProvider for Oracle.
        /// </summary>
        public class OracleDbSyncProvider : DbSyncProvider
            public OracleDbSyncProvider()
                // We need to modify this particular column name because the default is longer than Oracle allows.
                this.ScopeForgottenKnowledgeColName = "scope_forgotten_knowledge";
                this.ScopeNameColName = "scope_name";

            /// <summary>
            /// The IsolationLevel is ReadCommitted, however executing "set transaction read only" guarantees transaction-level
            /// read consistency.
            /// </summary>
            /// <returns></returns>
            protected override IDbTransaction CreateEnumerationTransaction()
                OracleTransaction trans = (OracleTransaction)this.Connection.BeginTransaction();
                new OracleCommand("set transaction read only", (OracleConnection)this.Connection).ExecuteNonQuery();
                return trans;

            public DbSyncScopeDescription ScopeDescription

    Monday, June 25, 2018 5:28 AM