locked
Microsoft Sync RRS feed

  • General discussion

  • HI all

    I have two databases to get Synchorize. Which are working fine.

     But on the client database when I was using BulkUpdate manually or by using Stored Procedure to Insert/Update the Client Database.

    The Sync is not working.

    Thanks In Advance


    veera

    Monday, May 7, 2012 9:43 AM

All replies

  • take note that if you're using SQL Server, SQL Express or SQL Azure, the change tracking is implemented using triggers.

    so bulk actions like Bulk Insert which by default dont fire a trigger, will not update the tracking tables. no updates made to tracking tables, no changes will be detected.

    Monday, May 7, 2012 10:24 AM
  • Thanks for the replay.

    But what are the other possibilities to over come this solutions. Because we dont have other criteria.

    The tables on the client database will be getting updated.

    The records which were already on the database and on the tracking list must be updated to get the rows sync. If not what are the other possible ways..

    Thanks


    veera

    Monday, May 7, 2012 10:54 AM
  • see: http://msdn.microsoft.com/en-us/library/ms187640.aspx

    if you're doing Bulk Insert, use FIRE_TRIGGERS

    if you're using bcp, use -h " FIRE_TRIGGERS "

    if you've already run the bulk insert without the triggers firing, then do a dummy update on the rows that were updated (assuming you know which rows are those) (e.g. update tablex set col1=col1  where <condition to filter on the bulk update loaded rows> )

    Monday, May 7, 2012 11:19 AM
  • ok thats fine.

    What about a Senario when updating  a row on sql query pad is getting  reflected in the SYNC.

    But there is another senario where client is updating 100 rows update at a time through a stored procedure. This senario is getting my exe struck and not making to sync the data to client to server.


    veera

    Monday, May 7, 2012 11:57 AM
  • as i have mentioned, for as long as the write operations fires the trigger, the _tracking table should be updated regardless of whether you're updating it via SQL commands, Stored procs, etc...

    you can easily verify this by looking at tracking table's last_change_datetime column...

    i suggest you enable sync fx tracing to figure out why some of your updates are not being applied, it could be that there are errors or conflicts encountered...

    Monday, May 7, 2012 12:52 PM