Replicate Stored Procedure Execution

  • Andy Warren

    SSC Guru

    Points: 119694

    Comments posted to this topic are about the item Replicate Stored Procedure Execution

  • sql_er

    SSCarpal Tunnel

    Points: 4135

    What if a new stored procedure is added to the publisher, will it be propagated to all the subscribers as well or should it be added in some special way for the propagation to take affect?

    Thank you

  • Andy Warren

    SSC Guru

    Points: 119694

    You add it normally to the publisher, then you'd have to manually check it as an article in the pub. From there replication handles pushing it to the subscribers.

  • Asaf Meir

    Grasshopper

    Points: 13

    Is there a chance to have the data changes (in the employee table) replicated and the have the data changes applied by the SP execution by the subscribers too?

    this is an unnecessary redundancy.

  • Andy Warren

    SSC Guru

    Points: 119694

    No, its smart enough to figure that out.

  • ruben.ortiz

    Valued Member

    Points: 59

    Hello

    maybe it is a stupid question but...why names of stored procedures are different in subscriber?

  • Andy Warren

    SSC Guru

    Points: 119694

    Ruben, I don't that happens by default, either someone renamed them in the publication or they were renamed directly.

  • ruben.ortiz

    Valued Member

    Points: 59

    Hi Andy

    I have setup a replication betweeen two sql servers, and I am having problems with replication of stored procedures. In fact, I'm reading your article to find some solution to my problem.

    I want replication of Stored Procedures will be exactly the same of Publisher/Distributor. Because developers usually modify stored procedures and I want this changes will replicate in subscriptor.

    I have noticed Views and tables are well replicated (exactly the same tables and same views) but in Stored Procedures I see Stored that doesn't exist in Publisher ¿? Just like you post (in image)on your article.

    And actually I don't know if this is ok or not.

    Thanks by your reply 🙂 I'm going to continue doing some test.

    Best regards

    Ruben O.

  • GabyYYZ

    SSCertifiable

    Points: 7913

    I know I'm a bit late with this question but hopefully someone still reads this article (which I found fantastically useful). 🙂

    Let's say I have a table replicated from publisher to subscriber. I need to update a MASSIVE amount of rows, by nullifying certain columns no longer used (unfortunately can't drop the column itself as it would force downtime when re-snapping). I've created a proc in our QA environment, replicating the execution as in the article (not serializable) that updates the rows on the publisher side.

    Now what I have down, on the subscriber side, the proc which was replicated, I have now wrapped in a huge comment block, so when it is executed in the publisher, the execution call to the subscriber does nothing, but still runs. The idea is that the subscriber keep those columns filled in, to be possibly null'ed later on.

    My big question, is there an issue having the actual data different between the two tables, even though the number of rows are the same, and all other data is the same, especially going forward with standard updates/inserts/deletes?

    Thanks!

    Gaby
    ________________________________________________________________
    "In theory, theory and practice are the same. In practice, they are not."
    - Albert Einstein

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

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