none
An SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection RRS feed

  • Question

  • I recently had to restore the central DB for a dozen or so SQL CE clients that use Sync framework 2.1 over WCF. All changes since the restore seem to refuse to sync. I'm seeing this error on the server side now: An SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection. I tried re-provisinging one of the local databases with no luck. any ideas?
    Tuesday, November 9, 2010 3:16 PM

All replies

  • the @changetable is actually a parameter in the bulk procedures. have you checked that all the Sync Fx relevant objects are in the restored copy of your database?

    Tuesday, November 9, 2010 3:39 PM
    Moderator
  • Sorry for the long silence. I guess alerts aren't working for some reason. I didn't see that you replied. As far as I can tell, the SyncFx relevant objects are in the restored copy of the database, yes.

    I can even see the parameter in the (very large number of) bulk sps in SQL Server. I can't seem to track down where it's being called from and why that parameter might be missing. It seems to be coming from inside the SyncFx dlls... Any ideas how to troubleshoot?

    thanks!

    Here is the exception stack trace if that helps...

    An SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection.
    ExceptionAttributes:
        Message:          An SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection.
        Exception type:   System.IndexOutOfRangeException
        Source:           System.Data
        Thrown in method: GetParameter
        In Class:         SqlParameterCollection
    StackTrace:
        at System.Data.SqlClient.SqlParameterCollection.GetParameter(String parameterName)
        at System.Data.SqlClient.SqlParameterCollection.get_Item(String parameterName)
        at Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ExecuteTVPCommand(IDbCommand cmd, DataTable applyTable, DataTable failedRows)
        at Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ApplyBulkChanges(DataTable dataTable)
        at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType)
        at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action)
        at Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action)
        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)
        at EPS.ClockWork.Services.SqlWebSyncService.ApplyChanges(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeData)

    Wednesday, November 10, 2010 6:48 PM
  • I enabled SyncTracing at the highest level (4) and here are the results:

    *****************************************************************
    ******************** New Sync Session ***************************
    *****************************************************************
    BeginSession: ScopeName: CustomScope-MikeYeager, Position: Remote
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:18:687,    BeginSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:18:734, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService;Password=****
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:18:844, Reading Schema Version Info
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:18:844,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:18:844, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService
    GetChangeBatch: Data Source=SQL01;Initial Catalog=ClockWork;User Id=ClockWorkService;
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:515, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:515, Reading Schema Version Info
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:515,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:531,    Executing Command: SELECT @sync_new_timestamp = min_active_rowversion() - 1
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:531,       Parameter: @sync_new_timestamp Value: Skipped since Not Input/InputOutput
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:531,    Executing Command: SELECT [scope_id], [scope_local_id], [scope_sync_knowledge], [scope_tombstone_cleanup_knowledge], [scope_timestamp], [scope_config_id], [scope_restore_count] FROM [scope_info] WHERE [sync_scope_name] = @sync_scope_name
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:531,       Parameter: @sync_scope_name Len: 22 Value: CustomScope-MikeYeager
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:562, ----- Checking for Outdated Peer -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:562,    Source Forgotten ReplicaKeyMap: [(0:209f7ea5841c4a7b8fc32dbd41ff2ff6) (1:a592e1dc56a54e869dbc6239f66947eb)] ScopeRangeSet: [00:[]]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:578,         Destination ReplicaKeyMap: [(0:209f7ea5841c4a7b8fc32dbd41ff2ff6) (1:a592e1dc56a54e869dbc6239f66947eb) (2:4ef7b15adb3b4807b0bd745aebc622ce) (3:87dc3046bb014dc7a2e8e3ef03eae9e7) (4:e965260a0a954962a569c706894a40fd) (5:b55a765e6b39467a857152105a40bc7d) (6:0060b4793582402889f3cf4706be2f2e) (7:a93d3dcde90643eda4f420d46962cae8) (8:0827b2d211cd4ce3ab917c9903f53917) (9:cdd27c89f2ce4330b5d4da7bcc5c82c3) (10:17ec65bd1e1e4f22a172ca69fc4a9dbe) (11:5b3f19bfc36f458aa3af6e220e30ea3e) (12:adce2577cd6b4773901e2a1f15498a6b) (13:d7365a7cf2694b658c4aaa38a18c60ba) (14:cfee1485a9c741fbbf1dd1d1007897a8) (15:b88533140f3e43c7b9e45787f105f0b2) (16:bd770632d0c2411994c1bfabf7681bee) (17:978c8c2fcac34603a0bdce148699bf6e) (18:e641863abb3043248c6606f185d3f67e)] ScopeRangeSet: [00:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:9223372036854775807)], 0064006200760065007200730069006f006e002d0031:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (18:9223372036854775807)], 0064006200760065007200730069006f006e002d003100:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:9223372036854775807)]]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:578,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:578,    Destination is not outdated
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:578, --- End Checking for Outdated Peer ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:578,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594, ----- Enumerating Changes for Scope "CustomScope-MikeYeager" -----
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,          Source Scope Id: 209f7ea5841c4a7b8fc32dbd41ff2ff6
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,     Destination Scope Id: e641863abb3043248c6606f185d3f67e
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,    Change Tracking Model: Decoupled
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,         Source ReplicaKeyMap: [(0:209f7ea5841c4a7b8fc32dbd41ff2ff6) (1:a592e1dc56a54e869dbc6239f66947eb) (2:4ef7b15adb3b4807b0bd745aebc622ce) (3:87dc3046bb014dc7a2e8e3ef03eae9e7) (4:e965260a0a954962a569c706894a40fd) (5:b55a765e6b39467a857152105a40bc7d) (6:0060b4793582402889f3cf4706be2f2e) (7:a93d3dcde90643eda4f420d46962cae8) (8:0827b2d211cd4ce3ab917c9903f53917) (9:cdd27c89f2ce4330b5d4da7bcc5c82c3) (10:17ec65bd1e1e4f22a172ca69fc4a9dbe) (11:5b3f19bfc36f458aa3af6e220e30ea3e) (12:adce2577cd6b4773901e2a1f15498a6b) (13:d7365a7cf2694b658c4aaa38a18c60ba) (14:cfee1485a9c741fbbf1dd1d1007897a8) (15:b88533140f3e43c7b9e45787f105f0b2) (16:bd770632d0c2411994c1bfabf7681bee) (17:978c8c2fcac34603a0bdce148699bf6e) (18:e641863abb3043248c6606f185d3f67e)] ScopeRangeSet: [00:[(0:61193) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:429)], 0064006200760065007200730069006f006e002d0031:[(0:61193) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (18:429)], 0064006200760065007200730069006f006e002d003100:[(0:61193) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:429)]]
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,    Destination ReplicaKeyMap: [(0:209f7ea5841c4a7b8fc32dbd41ff2ff6) (1:a592e1dc56a54e869dbc6239f66947eb) (2:4ef7b15adb3b4807b0bd745aebc622ce) (3:87dc3046bb014dc7a2e8e3ef03eae9e7) (4:e965260a0a954962a569c706894a40fd) (5:b55a765e6b39467a857152105a40bc7d) (6:0060b4793582402889f3cf4706be2f2e) (7:a93d3dcde90643eda4f420d46962cae8) (8:0827b2d211cd4ce3ab917c9903f53917) (9:cdd27c89f2ce4330b5d4da7bcc5c82c3) (10:17ec65bd1e1e4f22a172ca69fc4a9dbe) (11:5b3f19bfc36f458aa3af6e220e30ea3e) (12:adce2577cd6b4773901e2a1f15498a6b) (13:d7365a7cf2694b658c4aaa38a18c60ba) (14:cfee1485a9c741fbbf1dd1d1007897a8) (15:b88533140f3e43c7b9e45787f105f0b2) (16:bd770632d0c2411994c1bfabf7681bee) (17:978c8c2fcac34603a0bdce148699bf6e) (18:e641863abb3043248c6606f185d3f67e)] ScopeRangeSet: [00:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:9223372036854775807)], 0064006200760065007200730069006f006e002d0031:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (18:9223372036854775807)], 0064006200760065007200730069006f006e002d003100:[(0:61192) (1:10461) (2:183) (3:260) (4:185) (5:58) (6:63) (7:167) (8:296) (9:109) (10:66) (11:59) (12:122) (13:78) (14:5155) (15:2386) (16:4355) (17:58353) (18:9223372036854775807)]]
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 0 is Scope Id 209f7ea5841c4a7b8fc32dbd41ff2ff6
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 1 is Scope Id a592e1dc56a54e869dbc6239f66947eb
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 2 is Scope Id 4ef7b15adb3b4807b0bd745aebc622ce
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 3 is Scope Id 87dc3046bb014dc7a2e8e3ef03eae9e7
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 4 is Scope Id e965260a0a954962a569c706894a40fd
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 5 is Scope Id b55a765e6b39467a857152105a40bc7d
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 6 is Scope Id 0060b4793582402889f3cf4706be2f2e
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 7 is Scope Id a93d3dcde90643eda4f420d46962cae8
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 8 is Scope Id 0827b2d211cd4ce3ab917c9903f53917
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 9 is Scope Id cdd27c89f2ce4330b5d4da7bcc5c82c3
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 10 is Scope Id 17ec65bd1e1e4f22a172ca69fc4a9dbe
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 11 is Scope Id 5b3f19bfc36f458aa3af6e220e30ea3e
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 12 is Scope Id adce2577cd6b4773901e2a1f15498a6b
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 13 is Scope Id d7365a7cf2694b658c4aaa38a18c60ba
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 14 is Scope Id cfee1485a9c741fbbf1dd1d1007897a8
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 15 is Scope Id b88533140f3e43c7b9e45787f105f0b2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 16 is Scope Id bd770632d0c2411994c1bfabf7681bee
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 17 is Scope Id 978c8c2fcac34603a0bdce148699bf6e
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,   Id 18 is Scope Id e641863abb3043248c6606f185d3f67e
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:594,    ----- Table "Areas" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:609,       Executing Command: [Areas_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:609,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:609,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:609,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:609,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Areas" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Clients" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Clients_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Clients" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Employees" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Employees_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @EmployeesEmployeeName Len: 11 Value: Mike Yeager
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Employees" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "HideRecords" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [HideRecords_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @HideRecordsEmployeeName Len: 11 Value: Mike Yeager
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "HideRecords" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Files" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Files_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Files" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Projects" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Projects_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Projects" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Tasks" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Tasks_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    --- End Table "Tasks" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,    ----- Table "Tickets" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:625,       Executing Command: [Tickets_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_update_peer_key Value: 18
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @TicketsEmployeeName Len: 11 Value: Mike Yeager
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,    --- End Table "Tickets" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,    ----- Table "DBVersion" -----
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Executing Command: [DBVersion_selectchanges]
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_min_timestamp Value: 61192
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_scope_local_id Value: 2
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_scope_restore_count Value: 0
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,          Parameter: @sync_update_peer_key Value: 18
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Inserts: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Deletes: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Updates: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,       Changes Enumerated: 0
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,    --- End Table "DBVersion" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640, --- End Enumerating Changes for Scope "CustomScope-MikeYeager" ---
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640,
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640, Committing transaction
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:640, Closing Connection
    EndSession: Data Source=SQL01;Initial Catalog=ClockWork;User Id=ClockWorkService;
    *****************************************************************
    ******************** End Sync Session ***************************
    *****************************************************************
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:797,    EndSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

    *****************************************************************
    ******************** New Sync Session ***************************
    *****************************************************************
    BeginSession: ScopeName: CustomScope-MikeYeager, Position: Remote
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:812,    BeginSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:812, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:812, Reading Schema Version Info
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:812,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    GetSyncBatchParameters: Data Source=SQL01;Initial Catalog=ClockWork;User Id=ClockWorkService;
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:828, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:828,    Executing Command: SELECT [scope_id], [scope_local_id], [scope_sync_knowledge], [scope_tombstone_cleanup_knowledge], [scope_timestamp], [scope_config_id], [scope_restore_count] FROM [scope_info] WHERE [sync_scope_name] = @sync_scope_name
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:828,       Parameter: @sync_scope_name Len: 22 Value: CustomScope-MikeYeager
    VERBOSE, ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:20:828, Closing Connection
    ProcessChangeBatch: Data Source=SQL01;Initial Catalog=ClockWork;User Id=ClockWorkService;
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:031, Connecting using string: Data Source=SQL01;Initial Catalog=ClockWork;User ID=ClockWorkService
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:047,    Executing Command: SELECT @sync_new_timestamp = min_active_rowversion() - 1
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:047,       Parameter: @sync_new_timestamp Value: Skipped since Not Input/InputOutput
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:047,    Executing Command: SELECT [scope_id], [scope_local_id], [scope_sync_knowledge], [scope_tombstone_cleanup_knowledge], [scope_timestamp], [scope_config_id], [scope_restore_count] FROM [scope_info] WHERE [sync_scope_name] = @sync_scope_name
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:047,       Parameter: @sync_scope_name Len: 22 Value: CustomScope-MikeYeager
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:047,           Source ReplicaKeyMap: [(0:e641863abb3043248c6606f185d3f67e) (1:209f7ea5841c4a7b8fc32dbd41ff2ff6) (2:a592e1dc56a54e869dbc6239f66947eb) (3:4ef7b15adb3b4807b0bd745aebc622ce) (4:87dc3046bb014dc7a2e8e3ef03eae9e7) (5:e965260a0a954962a569c706894a40fd) (6:b55a765e6b39467a857152105a40bc7d) (7:0060b4793582402889f3cf4706be2f2e) (8:a93d3dcde90643eda4f420d46962cae8) (9:0827b2d211cd4ce3ab917c9903f53917) (10:cdd27c89f2ce4330b5d4da7bcc5c82c3) (11:17ec65bd1e1e4f22a172ca69fc4a9dbe) (12:5b3f19bfc36f458aa3af6e220e30ea3e) (13:adce2577cd6b4773901e2a1f15498a6b) (14:d7365a7cf2694b658c4aaa38a18c60ba) (15:cfee1485a9c741fbbf1dd1d1007897a8) (16:b88533140f3e43c7b9e45787f105f0b2) (17:bd770632d0c2411994c1bfabf7681bee) (18:978c8c2fcac34603a0bdce148699bf6e)] ScopeRangeSet: [00:[(0:446) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386) (17:4355) (18:58353)], 0064006200760065007200730069006f006e002d0031:[(0:446) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386)], 0064006200760065007200730069006f006e002d003100:[(0:446) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386) (17:4355) (18:58353)]]
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062,      Destination ReplicaKeyMap: [(0:e641863abb3043248c6606f185d3f67e) (1:209f7ea5841c4a7b8fc32dbd41ff2ff6) (2:a592e1dc56a54e869dbc6239f66947eb) (3:4ef7b15adb3b4807b0bd745aebc622ce) (4:87dc3046bb014dc7a2e8e3ef03eae9e7) (5:e965260a0a954962a569c706894a40fd) (6:b55a765e6b39467a857152105a40bc7d) (7:0060b4793582402889f3cf4706be2f2e) (8:a93d3dcde90643eda4f420d46962cae8) (9:0827b2d211cd4ce3ab917c9903f53917) (10:cdd27c89f2ce4330b5d4da7bcc5c82c3) (11:17ec65bd1e1e4f22a172ca69fc4a9dbe) (12:5b3f19bfc36f458aa3af6e220e30ea3e) (13:adce2577cd6b4773901e2a1f15498a6b) (14:d7365a7cf2694b658c4aaa38a18c60ba) (15:cfee1485a9c741fbbf1dd1d1007897a8) (16:b88533140f3e43c7b9e45787f105f0b2) (17:bd770632d0c2411994c1bfabf7681bee) (18:978c8c2fcac34603a0bdce148699bf6e)] ScopeRangeSet: [00:[(0:429) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386) (17:4355) (18:58353)], 0064006200760065007200730069006f006e002d0031:[(0:429) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386)], 0064006200760065007200730069006f006e002d003100:[(0:429) (1:61193) (2:10461) (3:183) (4:260) (5:185) (6:58) (7:63) (8:167) (9:296) (10:109) (11:66) (12:59) (13:122) (14:78) (15:5155) (16:2386) (17:4355) (18:58353)]]
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062,    Min Timestamp 61193
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062, ----- Applying Changes for Scope "CustomScope-MikeYeager" -----
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062,         Source Scope Id: e641863abb3043248c6606f185d3f67e
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062,    Destination Scope Id: 209f7ea5841c4a7b8fc32dbd41ff2ff6
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:062,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "DBVersion" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "DBVersion" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Tickets" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Tickets" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Tasks" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Tasks" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Projects" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Projects" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Files" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Files" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "HideRecords" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "HideRecords" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Employees" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Employees" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Clients" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Clients" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Deletes for Table "Areas" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Deletes Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Deletes for Table "Areas" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Areas" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Areas" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Clients" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Clients" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Employees" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Employees" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "HideRecords" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "HideRecords" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Files" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Files" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Projects" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Projects" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Tasks" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Tasks" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "Tickets" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "Tickets" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Inserts for Table "DBVersion" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Inserts Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Inserts for Table "DBVersion" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Areas" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Areas" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Clients" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Clients" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Employees" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Employees" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "HideRecords" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "HideRecords" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Files" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Files" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Projects" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Projects" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Tasks" -----
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,       0 Updates Applied
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    --- End Updates for Table "Tasks" ---
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,
    INFO   , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:078,    ----- Updates for Table "Tickets" -----
    ERROR  , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:125, Caught exception while applying changes: System.IndexOutOfRangeException: An SqlParameter with ParameterName '@changeTable' is not contained by this SqlParameterCollection.
       at System.Data.SqlClient.SqlParameterCollection.GetParameter(String parameterName)
       at System.Data.SqlClient.SqlParameterCollection.get_Item(String parameterName)
       at Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ExecuteTVPCommand(IDbCommand cmd, DataTable applyTable, DataTable failedRows)
       at Microsoft.Synchronization.Data.SqlServer.SqlChangeHandler.ApplyBulkChanges(DataTable dataTable)
       at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType)
       at Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action)
    ERROR  , ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:125, Rolling back application transaction.
    VERBOSE, ClockWork.Services.WindowsService, 8, 11/11/2010 18:49:21:125, Closing Connection
    EndSession: Data Source=SQL01;Initial Catalog=ClockWork;User Id=ClockWorkService;
    *****************************************************************
    ******************** End Sync Session ***************************
    *****************************************************************
    INFO   , ClockWork.Services.WindowsService, 6, 11/11/2010 18:49:21:125,    EndSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

     


    Mike Yeager
    Thursday, November 11, 2010 6:56 PM
  • Yet another piece of information... When we host the service in a Winform app, it works. When we host it in a Windows Service (the ultimate goal), it does not work. We have run the Windows Service under the same account as the WinForm app. This is definitely something burried deep down in the framework.

    Unless someone has a better idea, I'm going to try to attach to the windows service process and use .NET Reflector Pro to step through the framework code to try and figure out what's going on in there. I'm stumped...


    Mike Yeager
    Thursday, November 11, 2010 8:36 PM
  • I've been able to painstakingly trace through the sync framework source code and found the offending line(s) at lines 49 & 50 (according to the .NET Reflector Pro) of SqlChangeHandler.cs:

     public override List<int> ApplyBulkChanges(DataTable dataTable)
     {
      DataViewRowState unchanged = DataViewRowState.Unchanged;
      IDbCommand cmd = null;
      switch (base.ApplyType)
      {
      case ChangeApplicationType.Inserts:
    <strong><em>   unchanged = DataViewRowState.Added;
       cmd = ((SqlSyncAdapter) base.Adapter).BulkInsertCommand;</em></strong>
       break;
      
      case ChangeApplicationType.Updates:
       unchanged = DataViewRowState.ModifiedCurrent;
       cmd = ((SqlSyncAdapter) base.Adapter).BulkUpdateCommand;
       break;
      
      case ChangeApplicationType.Deletes:
       unchanged = DataViewRowState.Deleted;
       cmd = ((SqlSyncAdapter) base.Adapter).BulkDeleteCommand;
       break;
      }
    

    While debugging, it skips out of the case as soon as I run "unchanged = DataViewRowState.Added;". The debugger doesn't show it attempting to do the assignment to cmd or the break statement, although it DOES assign something to cmd. when I look at the parameters collection however, it shows 4 paramters - the first 2 are filled in, the second 2 are not - none of the parameters are @changeTable.

    Again, the odd thing is that this only happens when running a Windows Service as the host for the WCF service. It does not happen when running the service from a WinForms host.

     


    Mike Yeager
    Friday, November 12, 2010 8:34 PM
  • I was able to figure out how to trace deeper into the code. Unfortunately, it took so long that I'm not up for doing it again at this point. It just jumped out of the code somewhere around this point in RelationalsyncProvider.cs:

     internal void SetSessionParameters(IDbCommand cmd, bool getLocalTimeStamp, DataColumnCollection columns)
     {
      foreach (DbParameter parameter in cmd.Parameters)
      {
      if ((parameter.Direction != ParameterDirection.Input) && (parameter.Direction != ParameterDirection.InputOutput))
      {
       continue;
      }
      if (columns != null)</em></strong>
      {
       bool flag = false;
       foreach (DataColumn column in columns)
       {
    
    
    Strangest thing I've seen. The cmd and columns parameters seemed to have reasonable data in them. I know it's not exactly the same as stepping through the source code, but still. We have tried it on multiple machines and they all behave the same way. I may just have to chalk this one up to "Sync Framework over WCF doesn't work when hosted by a windows Service". Has anyone else been successful at this scenario?
    
    Mike Yeager
    Friday, November 12, 2010 11:12 PM