none
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

Answers

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?
    http://msdn.microsoft.com/en-us/library/aa259221(SQL.80).aspx

    Thanks
    Deepa

    Deepa ( Microsoft Sync Framework)
    Monday, June 22, 2009 6:33 PM
    Answerer
  • 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.

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

    This post could answer your question -

    http://social.msdn.microsoft.com/Forums/en/synctechnicaldiscussion/thread/3483679c-9ac4-4ec0-a10b-2a01077098bb

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)
    Tuesday, June 23, 2009 7:35 PM
    Answerer
  • 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
    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.  

    Thanks.

     


    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?

    Regards,
    Friday, January 8, 2010 6:41 PM