Monday, March 26, 2012

On the Fly Schema Changes in Merge Replication

I have always assumed that I must completely disable replication to make any
sort of change to published articles, but these article seem to say
otherwise:
http://msdn.microsoft.com/library/de...limpl_22pf.asp
http://msdn.microsoft.com/library/de...lctem_6l61.asp
I would like to add a column to an existing published article (during low
activity hours), but it seems to me a new snapshot would need to be created
(plus re-initialization of subscribers). My subscribers can be unavailable
for days (off-line but updating and inserting all the while). I can
understand that subscriber updates to the article may be lost at
re-initialization, but are other tables adversly effected?
I'm confused - why do you think that a snapshot would be necessary? The
article may have misled you - if the column already exists and has data in
it, then you're right, but if it an entirely new column, sp_repladdcolumn
will do the trick without new snapshots, reinitialization etc.
HTH
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul.
I suppose my assumptions about a snapshot were incorrect. I thought that
any schema change would require a new snapshot. So I will not need to worry
about my off-line subscribers losing data.
Where can I find more information about what information is kept in a
snapshot?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:ehwOt0sgFHA.3000@.tk2msftngp13.phx.gbl...
> I'm confused - why do you think that a snapshot would be necessary? The
> article may have misled you - if the column already exists and has data in
> it, then you're right, but if it an entirely new column, sp_repladdcolumn
> will do the trick without new snapshots, reinitialization etc.
> HTH
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Run the snapshot agent then have a look in the distribution working folder -
you'll see a bunch of text files to create teh schema, bcp data files, index
creation scripts etc. The exact files created depend mostly on the article
properties selected.
HTH
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks for the help!

No comments:

Post a Comment