locked
Synchronisation between 2 different database schema's RRS feed

  • Question

  • I try to setup the following scenario: The source database contains an article table and a child table with one or more prices per article.  The destination database contains one table with a subset of the article properties and one field for the prices.  The destination table should get the articles (from the source database) and the first price of the article. 

    How can I setup this scenario using the sync framework.  Are there any samples available?
    Friday, January 29, 2010 10:27 AM

Answers

  • June, from the underlying table, we need to know which is the PK and other schema details. Additionally triggers need to be created on the base table which are not possible for a view.

    Hence this is not supported for a view.
    This posting is provided AS IS with no warranties, and confers no rights
    Sunday, February 7, 2010 11:38 PM

All replies

  • Let me try to clarify your scenario a little bit.

    1. On the source database, you have 2 tables, article table is the parent table and price is the child table to parent.
    2. On the destination database, you have only 1 table which is the article tables (with subset columns) + the first price in the price table for this article.

    What is your sync direction?  Just from Source Database to the Destination Database or you would like to sync reversely, from Destination Database to Source Database, as well?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 29, 2010 3:36 PM
    Answerer
  • I try to setup the following scenario: The source database contains an article table and a child table with one or more prices per article.  The destination database contains one table with a subset of the article properties and one field for the prices.  The destination table should get the articles (from the source database) and the first price of the article. 

    How can I setup this scenario using the sync framework.  Are there any samples available?

    Try creating a view on the source tables (make sure you include sync tracking metadata though on the base tables), then make the view the source for sync towards your destination table. I'm assuming your this is just one-way sync to destination.

    hth,

    JuneT
    Friday, January 29, 2010 5:28 PM
  • Unfortunately a view cannot be synchronized.
    I also see that this issue is tracked in a separate thread and I have posted a couple of thoughts on how you can resolve this.
    http://social.msdn.microsoft.com/Forums/en/syncdevdiscussions/thread/58eaf02a-b480-4b82-ade4-cae12e909e10

    Please use one of these threads to continue and we can close the other one as dupe.
    This posting is provided AS IS with no warranties, and confers no rights
    Monday, February 1, 2010 5:18 AM
  • Hi Mahesh,

    Can you elaborate more on why this is not supported? I've seen a project where the base tables on the source have added columns for tracking changes (create and update timestamps), a view is created on top of those tables including the timestamps, and the Incremental SELECTs querying the view instead of the tables.

    Thanks!

    JuneT
    Monday, February 1, 2010 12:53 PM
  • June, from the underlying table, we need to know which is the PK and other schema details. Additionally triggers need to be created on the base table which are not possible for a view.

    Hence this is not supported for a view.
    This posting is provided AS IS with no warranties, and confers no rights
    Sunday, February 7, 2010 11:38 PM