Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

SQL Server Transaction Replication - how do I activate articles for publication?

$
0
0

Hello,

I have a pretty basic SQL Server transaction replication set up for a number of databases that is working fine. Every now and then, I need to add some new stored procedures or tables to the publisher. In order to replicate the new articles, I need to do this manually through the management studio - when I do so, the next time the snapshot engine runs, I get only one new generated snapshot article for each article I added. Perfect!

The problem I'm having is doing this through a script; I am able to add tables and stored procedures to the publisher without issue using sp_addarticle, but when the snapshot engine runs, I get no additional snapshot articles. If, I go into the publication using the management studio, uncheck one of the articles I added via script, exit out, go back in and add that article again, the next time the snapshot engine runs, I get ALL of snapshot articles - the ones I added through the script along with the one I used to force the situation.

Clearly I'm missing a step - when I compare the Snapshot agent details between a run that gives me what I'm looking for and one that does not, the magic line seems to be "Activated articles for publication 'abcde' at the publisher." When I manually add at least one of the articles, I get this line in the details. If I add everything via script, I do not.

Can someone tell me what step I'm missing? For a minute, I thought it might be sp_reinitsubscription but I don't think so anymore because if I manually reinitialize the subscription through SSMS, I don't get the new articles. It really feels like I've got to do something on the publication side of things.

Thanks in advance!

Respectfully,
Marshall


Viewing all articles
Browse latest Browse all 4054

Trending Articles