Groups | Blog | Home
all groups > sql server replication > november 2006 >

sql server replication : schema change in merge replication


owl
11/27/2006 7:55:02 AM
Hello ,
I am reading all the texts again and again, still not able to understand
what to really do.

Database we replicate to notebooks potentially contains a lot of data.

I may understand what to do, if I want to alter column using method you call
'altering the table in-place.' , and usage of sp_repladdcolumn.

Just what to do if I need to alter application trigger for this table or
add/drop index? Do I understand well, that I have to use 'altering
subscription process' with sp_dropmergesubscription, sp_dropmergearticle,
change...., .....

Second question:
Paul wrote on www.replicationanswers.com , 'If we drop the subscription
entirely including all other articles (sp_dropmergesubscription), then try to
run sp_dropmergearticle there will be an error if the snapshot has already
been run, so we have to set @forceinvalid_snapshot to 1, make the table
change on the publisher then readd the article and subscriptions and
initialize which would necessitate a new snapshot generation of all articles
in this publication. A nosync initialization is possible, but this can be
extremely restrictive for future changes, and I'll leave that for another
article.'

Does this mean that if I do any simple schema change in merge replication
environment using 'altering subscription' , complete snapshot for all
articles will be transferred over network?
Or is there any other way how to change one article without huge traffic?


Thanks for answer

Lenka
Paul Ibison
11/27/2006 5:09:48 PM
To change indexes or other misc objects you can use sp_addscriptexec and not
drop the article.
If you're using sql server 2005, you can drop and readd the article and have
just the new article synchronized.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

owl
12/5/2006 4:36:02 PM
Thanks for answer.

Could you please explain me in addition 'how does it work inside? :-)' or
send me a link if explained somewhere.

Merge replication, I have somewhere saved initial snapshot. Then I do
schema changes on publisher and I propagate them to existing subscribers
using sp_addscriptexec.

How let's say new subscriber will be created then? Is not init snapshot
already obsolete?

Thanks. Lenka


[quoted text, click to view]
Paul Ibison
12/6/2006 9:51:39 AM
There isn't anything really comprehensive on how merge replication works
that I know of at present (Hilary might chip in here as he has written a
transactional replication book and was planning a merge companion volume).
Anyway, the links below are quitre good and will take you to a decent level
of understanding.
http://searchsqlserver.techtarget.com/tip/1,289483,sid87_gci1119296,00.html?track=lc_replication_techniques
http://msdn2.microsoft.com/en-US/library/aa256294(SQL.80).aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .



AddThis Social Bookmark Button