Provisioning - Best practices RRS feed

  • General discussion

  • Just wanted to start a discussion about provisioning and best practices.

    My first sync fx project, I provisioned all the tables I needed in one scope.  On the client side, I would drop all foreign keys, sync, and then add the foreign keys back.  It worked reasonably well.  You would think the addition of the foreign keys would take quite a while, but it all happens within a few seconds.

    I'm starting a new sync fx project, and I think i will add my lookup tables to one scope, master data collection tables in another scope, and child data collection tables in another scope.  I will sync in that order so that I don't have to do the steps with the foreign keys.

    How have you done provisioning?  What has worked/not worked for you?

    Sunday, September 25, 2011 12:33 PM

All replies

  • a few things to consider when grouping tables into scopes:

    - sync frequency (you dont want to group 10 tables into one scope when only one table frequently changes)

    - table sizes (you want the small tables with small changes to commit immediately than having open transactions while waiting for the bigger tables to complete their sync)

    - potential for schema changes - there is no OOTB support for modifying scope definition when schema changes, so you would deprovision/reprovision. if you have a table that has a potential to have its schema change, you might want to separate it so if you deprovision/reprovision, only that table's knowledge is lost)

    - potential for conflicts - you may want to put tables where there are high chances of conflict into  separate scopes, so these tables dont hold up other tables transactions while you resolve the conflict

    essentially, you'd want to finish the sync as fast as possible for each table and you'd want to isolate conflict resolutions/schema modifications so they dont hold up other tables.

    Monday, September 26, 2011 4:25 AM
  • Thanks for the tips JuneT. 
    Tuesday, September 27, 2011 1:54 AM
  • Follow up question, in the case of master/detail scenario...

    Say for instance I have a beer manufacturer and a beer products table.  The manufacturer table has an entry as follows...

    ID = 1, Description = Dogfish Head

    The Beer product table has the following...

    ID = 1, Description = 60 Minute IPA, ManufacturerId = 1
    ID = 2, Description = Aprihop, ManufacturerId = 1
    ID = 3, Description = Punkin Ale, ManufacturerId = 1

    I have a foreign key setup between the two tables on both the server and client side.

    Does it make sense to have these tables in the same scope? Say a new manufacturer comes along, with 5 new beer products.  I don't want the beer products table to sync before the beer manufacturer table because then my client database will throw a key violation error.  Is Sync Framework smart enough to sync these in the proper order? 

    Or is it a better practice to put the master tables in one scope and the details in another scope, and sync the master tables before the detail tables.

    Thanks for your input!

    Friday, February 3, 2012 1:33 PM
  • just make sure you add the parent table before the child table in the scope.



    Saturday, February 4, 2012 3:53 PM