none
Use of tombstone table RRS feed

  • Question

  • Hi everyone.

    I am currently working on a project where we are going to use Sync framework to synchronize a SQL server through WCF with a local SQLCE database.

    I am new to this technoloy, but after trying different scenarios, I was able to build a testing database, with WCF and I achieved the synchronization. So far, so good.

    My question is regarding the tombstone table used to collet the ID of deleted entries.

    One of the requirements of the project, is that the data will never be deleted, but flagged as archived. Therefore, I would like to know, if I must still create the tombstone tables, or if I can just ignore them, as no data will be deleted, and these tombstone tables will never be populated ?

    As I said, I am new to Sync framework, and I am sorry if this question seems a bit dumb, but I just want to make sure than not creating these tombstone tables will not affect the running of the Sync Framework.

    Thank you in advance for your response, and a big thank you to the Microsoft team for providing such a great tool, saving us all hours of coding. The prvious synchronization system we used was hand crafted and full of bugs. Hopefully, with Sync, a lot of the problems we had in the past can be solved.

    Wednesday, January 18, 2012 2:28 PM

Answers

  • there's another set of providers that works in a peer-to-peer topology (also with hub-spoke) and can sync between Sql Ce, Sql Express, Sql Server or Sql Azure.

    There is no Sync v4. What used to be known as the v4 CTP is now released open-source as Sync Toolkit. The Sync Toolkit is primarily for clients that cannot install the full Sync Framework runtime (WP7, Silverlight-based apps, HTML 5, iPhone, etc...)

    If what you have is working and it meets your requirements, you can stick with it.

    • Marked as answer by ManuPetit Thursday, January 19, 2012 8:14 AM
    Wednesday, January 18, 2012 11:50 PM
    Moderator

All replies

  • am assuming you're using the older SqlCeClientSyncProvider/DbServerSyncProvider/SyncAgent combo.

    so yes, the tombstone table is just used to store the IDs of delete rows.

    if you dont want to create the tombstone tables, make sure you dont have a SelectIncrementalDeletes querying it.

    having said that, why can tyou just leave the tombstone tables as it is since the empty tables wont consume that much space anyway? saves you all the trouble of removing the tombtone tables and the SelectIncrementalDeletes and just letting Sync Framework as it is. And makes it ready to handle deletes just in case you decide to sync deletes in the future.

    Wednesday, January 18, 2012 2:36 PM
    Moderator
  • Thank you for your answer. I shall leave the tombstone tables as you said they will not take any space.

    You are mentionning the fact that I use older SqlCeClientSyncProvider/DbServerSyncProvider/SyncAgent combo. Is there a newer sync technologies ? Should I used The Microsoft Sync Framework 4.0 CTP ?

    I build my sample testing unit following a walkthrough from msdn, but I have not look into Sync 4 CTP ? Do you think I should go that way?

    Wednesday, January 18, 2012 2:47 PM
  • there's another set of providers that works in a peer-to-peer topology (also with hub-spoke) and can sync between Sql Ce, Sql Express, Sql Server or Sql Azure.

    There is no Sync v4. What used to be known as the v4 CTP is now released open-source as Sync Toolkit. The Sync Toolkit is primarily for clients that cannot install the full Sync Framework runtime (WP7, Silverlight-based apps, HTML 5, iPhone, etc...)

    If what you have is working and it meets your requirements, you can stick with it.

    • Marked as answer by ManuPetit Thursday, January 19, 2012 8:14 AM
    Wednesday, January 18, 2012 11:50 PM
    Moderator
  • Thank for all your precious comments.
    • Marked as answer by ManuPetit Thursday, January 19, 2012 8:14 AM
    • Unmarked as answer by ManuPetit Thursday, January 19, 2012 8:14 AM
    Thursday, January 19, 2012 8:14 AM
  • Hi ManuPetit,

     

    The need for tombstone comes from the fact that should data be deleted from the client after they have been deleted from the server. In your case, it is archiving. Once archived, you might want to remove the data from the sql ce database (There are many advantages, including, reduction of size of the Sql Ce Database).

    Thus you need the tombstone database. As a optimisation, you can just have the primary keys in the tombstone table to reduce the tombstone table size growth.

    It is also recommended that you have some sort of purging mechanism to prevent the tombstone database from growing indefinitely.

     

    • Proposed as answer by Somanii Friday, October 5, 2012 4:58 AM
    Friday, January 20, 2012 11:45 AM