none
Using views in peer to peer sync? RRS feed

  • Question

  • Hi,

    Can I use views instead of tables in peer to peer sync. In my application I have scenario where in the tables structure in one peer is different than other peer for e.g

    Peer 1

    I have three table i.e

    Company:  id, companyname

    offices: id, companyid, officename

    Broker: id, firstname, lastname

    Peer 2

    Company:  id, companyname, officename

    Broker: id, firstname, lastname

    I am thinking to use views so that I can make the structure of both the tables i.e. (company and office similar to peer 2 table structure) but not sure whether this will work

    Any Idea, suggestions or better approach will be highly appreciated.

    Thanks


    Saturday, June 16, 2012 2:56 PM

All replies

  • sync fx doesnt support synching via views.

    when provisioning, sync fx will add triggers on your base table to update the tracking tables to record the changes.

    in the case of a view, the change can occur in any of the tables used in the view.

    in your scenario, which table update will mark the change for synching?

    Sunday, June 17, 2012 12:58 PM
    Moderator
  • As of now there is no tracking table defined for any tables. However i can keep one common tracking table for both company and office and one for broker for peer 1 and for peer 2 one tracking table for company and one for broker. This way I can keep the tracking table same in both peers. 

    June, this are my thoughts for the given problem statement. If you have any better idea then it will be helpful. 

    Thanks

    Monday, June 18, 2012 9:03 AM
  • the tracking tables are created by Sync fx itself, based on your plans, that means you have to hack the sync fx objects after you provision them for synching.

    if you're doing bidirectional sync, you will have to hack the sync again to sync one table agaisnt two.

    can you not just alter the existing schema to make them the same?

    Monday, June 18, 2012 10:27 AM
    Moderator
  • It is difficult, since the schema for both the database are in production. 
    Monday, June 18, 2012 11:28 AM
  • if the sync is bidirectional, you will have to "hack" it many areas, you'll probably be better off just using SSIS.

    Tuesday, June 19, 2012 2:11 AM
    Moderator