Initially we have set up a bi-directional sync between our client (sql 2005) and server (sql 2008) . In real time, server(sql 2008) is less updated by our end users. So to improve the performance we implemented a mechanism outside the sync to find out any change happened on the Server (sql 2008) . If no change found on server(sql 2008), we started doing only upload sync. If change is found, we are doing bi-directional sync.
In upload sync scenario, the framework is not updating the scope_info table on client side with latest knowledge. It is only updating the knowledge on the server (sql 2008).
In every upload sync it using the same @sync_min_timestamp value and performing the sync . I believe it should update the scope_sync_knwoledge in scope_info on client (sql 2005) so next sync will start only selecting incremental changes.
It should not. Your client sync knowledge has not changed when you do an upload only sync. Its the destination that has changed. The sync knowledge stores what was last sync from other replicas, not what it has sent. Likewise, the @sync_min_timestamp is from the destination sync knowledge, not from the source
Thanks JuneT for your time.
I understood your point, but every time sync FX is using same @sync_min_timestamp value from scope_info in all upload syncs.
When upload sync is completed, at least we have to update the knowledge about the last sucessfull timestamp to the server we are syncing at client side. so that in next cycle it starts with a new @sync_min_timestamp value or else it's again selecting already synced rows and comparing them with destination.
Its causing huge performance impact on the server.
"The sync knowledge stores what was last sync from other replicas, not what it has sent"
I agree on above line. But it cant use same @sync_min_timestamp value for all the upload syncs.
@sync_min_timestamp should change for each sync cycle. If we are not updating client on upload sync. We should update it on server side so that when we perform "getknowledge" after "beginseession" step, framework might get the new timestamp value for @sync_min_timestamp from server side knowledge to perform the next upload sync.
please share you thoughts?