none
Records added using BULK INSERT do not synchronize RRS feed

  • Question

  • Hi

    I have 2 database: client and server provisioned. On server I run an BULK INSERT COMMAND to populate the tables.

    After the sync session, this data is not copied on client. What happens?


    sb_angela
    Thursday, August 4, 2011 3:56 PM

All replies

  • possibly this will help..

     

    Controlling Trigger Execution When Bulk Importing Data

    http://msdn.microsoft.com/en-us/library/ms187640.aspx

    Thursday, August 4, 2011 4:20 PM
  • check out the link that Racing_Prog cited above.

    Sync Framework uses triggers to update  the tracking tables. by default, Bulk Insert disables triggers. So when you do Bulk Insert, the triggers dont fire and no corresponding entry is made on the tracking tables. Sync Fx therefore is not aware of these changes.

    Friday, August 5, 2011 12:58 AM
    Moderator
  • Hello

    Thank you for your answers, they helped my solve the problem.

     

    This is my insert bulk command:

    BULK INSERT Product FROM 'C:\ProductData.txt' WITH(FIELDTERMINATOR = '.',ROWTERMINATOR = '\n', KEEPNULLS)

    I added FIRE_TRIGGERS and the new records were registered in the tracking table.

     

    This one does the trick

    BULK INSERT Product FROM 'C:\ProductData.txt' WITH(FIELDTERMINATOR = '.',ROWTERMINATOR = '\n', KEEPNULLS, FIRE_TRIGGERS )


    sb_angela
    • Proposed as answer by JuneTModerator Thursday, August 11, 2011 2:45 PM
    Friday, August 5, 2011 6:37 AM