In our customers environment is a massive central server (running SQL Server Enterprise 2008R2) and some distributed PCs (running SQL Server Standard 2008R2).
The central server has a replication for all Stored Procedures and Functions, but only for some tables with master data (like products and materials) for the other PCs.
I've come across
sp_addscriptexec to add a script that will be able to do this (except I haven't found a good explanation for this).
But the catch with our customer is that not all PCs are online all the time, so there is the probability that there was more than one change to the database structure.
How are the
sp_addscriptexec scripts actually executed? Are they executed only once or on every replication run? Will they run in a specific order or randomly? Also can someone give me an example how to actually use the command?
And the biggest question, is this a good approach for doing this kind of stuff or are there other alternatives?