We do releases frequently on a databases that we use replication on. When we make changes to replicated articles we need to stop Replication, Remove the Objects from the Articles, Complete the release, Test then manually add the articles back and restart replication.
I would like to script this but I am having difficulty with the correct scripts. This is what I have been Playing with
DECLARE @publication AS sysname;
DECLARE @subscriber1 AS sysname;
DECLARE @subscriber2 AS sysname;
DECLARE @article AS sysname;
SET @publication = N'PubName';
SET @subscriber1 = N'SubscriberName1';
SET @subscriber2 = N'SubscriberName2';
SET @article = N'ArticleName';
USE [PublisherDB]
EXEC sp_dropsubscription
@publication = @publication,
@article = @article,
@subscriber = @subscriber1;
EXEC sp_dropsubscription
@publication = @publication,
@article = @article,
@subscriber = @subscriber2;
EXEC sp_droparticle
@publication = @publication,
@article = @article,
@force_invalidate_snapshot = 0;