How to manage database schema updates with merge replication ?

How to manage database schema updates with merge replication ?

Old forum URL: forums.lhotka.net/forums/t/145.aspx


Jan posted on Thursday, May 18, 2006

Hi,

Designing an application that will be used by field engineers on their laptops in offline mode.  Laptops will have CSLA 2.0 with SQL Server Express 2005 (later perhaps SQL Server Everywhere), and will synchronise when online with a central SQL Server through merge replication.  I intend to use ClickOnce deployment to get the app deployed and updated.

As updates for this application will become available, inevitably there will be database-schema-changes from time to time. 

Any best practices on how to manage database-schema changes and how to distributed them to all the clients, without losing existing data, keeping in mind that not all clients might update at the same time.  Some engineers might continue to work with the old version for a couple of days before coming online and get updated, while others have already been updated.

Thanks,

Jan

hurcane replied on Friday, May 19, 2006

Merge replication has the ability to automatically replicate schema changes. The merge replication isn't really seen by CSLA. Your business objects should always use the local database. Merge replication updates the database, but I don't think any CSLA-based objects would be involved while the subscription is being merged.

SQL Server Books Online has numerous in-depth articles regarding merge replication.

ajj3085 replied on Friday, June 01, 2007

Sorry for bringing an old thread back to life..

I've been considering this question as well though.  Its all well and good to say 'books online has articles,' but I'm not sure I've seen answers to some of my questions..

Like what happens when you have a one to many table, and then change it to a many to many relationship?  What happens to new data in the laptop's database in said table?

If it can't handle such scenarios automatically, then it seems like managing schema updates on the laptops becomes a huge maintenance issue.

Copyright (c) Marimer LLC