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

Stored Procedure Execution Replication - DDL changes

$
0
0

Hi,

I have a simple Transactional Replication set up, a few tables, and 1 stored procedure. The SP manages an archive process to do batched deletes from the publication db  & inserts to a local archive database. The SP is replicated as we need to do the same deletes on the subscriber. However - as there is no archive database at the subscriber end, I don't want to to do the archive inserts section so I modify the subscriber SP after it has been replicated, to remove the inserts. No problem, all works fine, until... 

If I modify the SP at the publisher end, the DDL change replicates to the subscriber. No problem again, or so I thought, I'll just change the SP articles subscription property'Action if name is in use'to 'Keep existing objects unchanged'. BUT, if I alter the SP at the publisher now it *STILL* changes the subscriber SP.

MS doco (http://technet.microsoft.com/en-us/library/ms152562(v=sql.105).aspx) states that you need to disable replication of schema changes if you do this kind of thing, then turn it back on after the schema change. If thats the case, what is the 'Action if name is in use'to 'Keep existing objects unchanged' property for in terms of SPs?

Can I use this setting for that purpose, or do I need to wrap my inserts in a boolean check for 'Am I a Publisher db' or 'Do I have an archive database on my instance'?

thanks

Matt

( And BTW, my thanks to Hilary, I've lurked a lot of replication help from you over the years).



Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>