Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have added a new article to an existing push publication with the following code

sp_addarticle @publication='statics', article='FlightBaggageMarkup_tbl',source_object='FlightBaggageMarkup_tbl'

  EXEC sp_addsubscription
  @publication = 'Statics',
  @subscriber = 'SURVIVOR',
  @destination_db = 'MLT-Replicated'

this is a push subscription with immediate_sync switched off, running continuously instead of a schedule

run the snapshot agent and see it picks up just the new table, ok great. but the table and the custom stored procedures never appear at the subscriber and then replication falls over if you try to change a value in the source table as it cant find the stored procedure to call on the subscriber ? I have only seen this behavior since upgrading to 2012, but this maybe a coincidence

share|improve this question

1 Answer

According to Define an Article:

If the publication has existing subscriptions and sp_helppublication returns a value of 0 in the immediate_sync column, you must call sp_addsubscription to add the article to each existing subscription.

After executing sp_addarticle, execute sp_addsubscription to add the article to each existing subscription. Then generate a new snapshot. The Distribution Agent should then copy the schema and data for the newly added article to the Subscriber(s).

share|improve this answer
I'll test this out now and see if I can repro. – Brandon Williams Dec 16 '12 at 0:11
I'm not sure what to say here. I just followed the same steps as you on SQL Server 2012 and it worked for me. – Brandon Williams Dec 16 '12 at 0:25
all these look ok... if sql server sees the tables already exists on the subscriber (but created manually to work) will it still overwrite it... when I run the snapshot agent now it says no snapshot completed as no new articles... but the article is definately in the publication... I'd like to drop it and re-add but this will invalidate the snapshot. Then it will have to do all tables, is that correct ? – DamagedGoods Jan 9 at 13:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.