Merge Replication : Stored procedure as an article?

  • In a merge published database, I can alter one of the procedures, and the alterd procedure gets altered at the subscribers. Very cool.

    But if I make a new stored procedure, how do I get it on the subscribers? I'd think exec sp_addmergearticle.

    If so how?

    If not, why not?

    Yes, a fresh snapshot does the trick but it takes so long to get the new snapshot applied to the subscribers that the clients revolt, so I'm looking for something quicker 😎

    [font="Arial"]Halfbubble ------------
    You just can't do this stuff unless you're at least half a bubble off center.[/font]

  • I'm thinking that you can add a new article http://msdn.microsoft.com/en-us/library/ms146887%28v=SQL.100%29.aspx

    I cannot see a way to get around the snapshot, but if you have a snapshot of procs, is that a big deal? It might be, I'm just asking.

  • Someone suggested sp_addscriptexec, but carefully.

    http://msdn.microsoft.com/en-us/library/ms174360.aspx

  • You can make a snapshot of just the stored procedures?

    [font="Arial"]Halfbubble ------------
    You just can't do this stuff unless you're at least half a bubble off center.[/font]

  • You can snapshot a publication, or at least I believe you can. If you have a pub with ONLY stored procs that can work.

    You might be able to script out, rebuild the pub, and say "init from backup" if everything is OK, and then just add the proc to each sub.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply