locked
Sync MetaData Values RRS feed

  • Question

  • Hub & Spoke
    DbServerSyncProvider -> sql2005 server
    SqlExpressClientSyncProvider (modified per this forum's suggestions) -> sqlexpress2005 client
    SqlSyncAdapterBuilder being used for sync adapters

    I'm uncertain what the sync framework 2 is expecting wrt metadata values.

    On the server side, every synced table (ignoring tombstones) should have:
    UpdateOriginatorIdColumn guid
    UpdateTrackingColumn timestamp
    CreationOriginatorIdColumn guid
    CreationTrackingColumn binary(8)

    On the client side, every synced table (ignoring tombstones) should have:
    UpdateOriginatorIdColumn guid
    UpdateTrackingColumn timestamp
    CreationOriginatorIdColumn guid
    CreationTrackingColumn binary(8)

    Additionally, the client must have:
    Anchor table with LastSent & LastReceived anchors
    guid table (optional-ish) to maintain a guid identifier to represent its local data store - convenient to store in db in a guid table like in the sample apps.

    The guid table is a slam dunk.  However, I'm not sure what the other tables really need to look like.  For example, when there's a new record (representing a new table) in the anchor table, what should the LastSent & LastReceived columns contain?  0? null? Something else?

    When the server table gets the metadata columns appended, what should those columns contain?

    On the client side, the MS code sample I based my work on was assigning a 0 (I used an all zeros guid since my IDs are guids) for the default  for CreationOriginatorID column.  Syncing did not send this row to the server.  Changing the column to the Client's ID from the guid table causes the row to sync.

    What should these values default to when tables are first created, rows are inserted, etc?

    Is there some diagram or cheat sheet that can be referenced?
    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:46 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, October 21, 2009 6:37 PM

Answers

  • Hi,

    Please follow the SQL commands in CreateDatabase_Local.sql and CreateDatabase_Server.sql in SqlExpressionProviderSample\Scripts to setup the values for new added table. For example, the LastSent & LastReceived columns values were set to Null in these SQL Scripts.

    Thanks,
    Dong
    This posting is provided AS IS with no warranties, and confers no rights.
    Friday, October 30, 2009 10:42 PM
    Moderator