Provisioning a server error RRS feed

  • Question

  • Good day!
    I'm trying to synchronize two SQL 2008 databases following the sample in the Sync Framework Documentation, but on the part when provisioning a server, I get an error that it "Cannot insert explicit value for identity column in table 'Books_tracking' when IDENTITY_INSERT is set to OFF. Why is this so?

    Thank you very much.
    Sunday, June 21, 2009 10:36 PM


All replies

  • Hi -

    The link has more information on the error code - is there a reason you are trying to insert an explicit value in the Books_tracking table?


    Deepa ( Microsoft Sync Framework)
    Monday, June 22, 2009 6:33 PM
  • Good day sir!
    Thank you for your response.
    It is the generated scripts of the Sync Framework that inserts to the tracking tables. The triggers that are also generated would also not work since it is also trying to insert explicit values to the tracking tables.

    Monday, June 22, 2009 10:20 PM
  • Hi -

    This post could answer your question -


    Deepa ( Microsoft Sync Framework)
    Tuesday, June 23, 2009 7:35 PM
  • Hi Deepa, team,

    Can you please elaborate?

    I am having the same problem when calling Apply on an instance of SqlSyncScopeProvisioning.

    My table schema includes an auto-incrementing identity field which is also a filter column specified in the SqlSyncScopeProvisioning instance.

    Thank you,

    Rick G. Garibay MVP, Connected Systems
    Tuesday, July 7, 2009 11:01 PM
  • I have been able to work around the issue during provisioning by just writing out the provisioning script to disk and running it out of band:

    File.WriteAllText(@"C:\ServerConfigScript.txt", serverConfig.Script("Db"));

    However, during synchronization, this is still an issue.

    This is a pretty straightforward scenario in whcih the table to by synchronized has a primary key of type integer which is auto-incrementing.  



    Rick G. Garibay MVP, Connected Systems
    Wednesday, July 8, 2009 5:14 AM
  • Hi,

    Have the same issue.

    Is there a way to issue the IDENTITY_INSERT IS ON/OFF command on the tracking table?

    Friday, January 8, 2010 6:41 PM