I'm using MS Sync framework to sync local database (sql express) to master database: The users have sql express on their laptop which do not have any network connection in their environment. Once finished the work, they are back and have the connection. Then, they sync their local database to master database.

Since there are multiple users, does that mean for each user, we have to use a different schema & scope for the DbSyncScopeDescription?

or, in other words, does it need to create tracking table (by Sync framework) for each user? or, the tracking table in master database is shared by different users?

thanks

2

There are 2 best solutions below

0
On

Each database instance participating in the sync requires its own Sync tracking tables/triggers/sprocs.

The schema and scope have to do with the syncing process and there can be 1 or more.

0
On

the tracking table is for every table you want to sync. a scope is a definition/grouping of what you want to sync.

if the tables/columns/rows to be synched are the same for the users, they can share the same scope definition.

the tracking tables are updated via triggers on the base table, i dont think you want multiple triggers updating multiple tracking tables every time you insert/update/delete.

you use the schema if you want to separate the sync objects in its own schema (you can also use object prefix to clearly identify these objects in your database)