2

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?

  • What replication type are you using ? – Kin Shah Jun 13 '14 at 13:26
  • I'm not 100% sure what exactly you want to know. It's a standard SQL Server Publication Replication on the Central Server side. – Staeff Jun 13 '14 at 13:42
  • I meant to ask, if it is a T-Rep or Merge or Peer-to-Peer. Hope it is clear now. – Kin Shah Jun 13 '14 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.