March 10, 2010 at 2:50 pm
OK...I am almost there!! What I need to do is build a little query (??) at the top of my script, that will get me the name of the Subscriber (Servername) on whatever environment I will be running the deployment scripts on.
I want to use a variable in the replication exec calls, @Servername, (see as follows):
PRINT N'Dropping tables from subscription'
GO
exec sp_dropsubscription @publication = 'Org_ETL'
, @article = 'PersonOrg'
, @subscriber = @ServerName
, @destination_db = 'Org'
GO
....and also when I am adding the articles back in, use this same @Servername where Subscriber = @ServerName.....
Can you give me some tips?? I am not replication table savvy yet!!!
Thank you AGAIN!!!!! :hehe:
March 12, 2010 at 7:09 am
DECLARE @SubscriberName varchar(100)
SET @SubscriberName = @@Servername
Select @SubscriberName
Would this work? But that would mean that you have to run the subscriber scripts on each of the Subscriber Database server.
-Roy
March 12, 2010 at 8:27 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply