Sync calling select row on destination server for all changes it selected on source. RRS feed

  • Question

  • I am syncing two servers using sync fx 2.1. I followed backup and restore process to setup the sync.

    Here I was facing two issues:

    Issue 1: Running postrestore fix up tool on database corrupting the timestamps. The @sync_min_timestamp is becoming zero. which selecting all rows in a table when it executes <tablename>_selectchanges 

    I enabled sql trace to find out what is happening internally and found the where condition looks failing causing the update not to occur.

    (@sync_check_concurrency = 0 OR [scope_timestamp] = @sync_scope_timestamp) , both conditions are failing stopping the update to be happen on the scope_info table.

    but when I run post restore fixup, sync_check_concurrency is set to '1' please see the update statement from sql profiler during the post restore fixup. How the value of @sync_check_concurrency  is descided?

    And there are two scopes in my database

    declare @p9 int
    set @p9=1
    exec sp_executesql N'UPDATE [scope_info] SET [scope_id] = @sync_scope_id, [scope_sync_knowledge] = @sync_scope_knowledge, [scope_tombstone_cleanup_knowledge] = @sync_scope_cleanup_knowledge, [scope_restore_count] = [scope_restore_count] + 1 WHERE [sync_scope_name] = @sync_scope_name AND (@sync_check_concurrency = 0 OR [scope_timestamp] = @sync_scope_timestamp);SET @sync_row_count = @@ROWCOUNT',N'@sync_scope_name nvarchar(100),@sync_scope_id uniqueidentifier,@sync_scope_knowledge varbinary(200),@sync_scope_cleanup_knowledge varbinary(140),@sync_check_concurrency int,@sync_scope_timestamp bigint,@sync_row_count int output',@sync_scope_name=N'SyncScope1',@sync_scope_id='A79890C3-0517-4C1D-A73C-EDC83BD39BA4',@sync_scope_knowledge=0x000000050000000000000004000000000000000500001000000004A79890C305174C1DA73CEDC83BD39BA4EA00C0329E1A49928C952F8AB3609A1281F77A4545E046FB9AE236F75EF0E7B122E12CC7D2154653B8A08706DCFE6274000000180000100128020000010000001500000002000000010000000000000001000000030000000100000000023E66E4000000020000000002A8AD72000000030000000003C4F895000000170000000100000016000000010003000000000100000000000000190100000000,@sync_scope_cleanup_knowledge=0x000000050000000000000004000000000000000500001000000003A79890C305174C1DA73CEDC83BD39BA4EA00C0329E1A49928C952F8AB3609A1281F77A4545E046FB9AE236F75EF0E7B10000001800001001280200000100000015000000010000000100000000000000170000000100000016000000010003000000000000000000000000190100000000,@sync_check_concurrency=1,@sync_scope_timestamp=37617120,@sync_row_count=@p9 output
    select @p9

    Issue 2: After the sync starts working ,  for any change that happened on source server for first time after backup and restore its calling <tablebname>_selectrow on destination server.

    After backup and restore on source server we made nearly 1gb of changes and when I turn on the sync instead calling bulk updateits calling <tablename>_selectrow for each row causing timeouts.

    Please advice.

    • Edited by saisync Monday, December 16, 2013 7:03 PM more information
    Monday, December 16, 2013 2:29 PM