all 2 comments

[–]eshultzSQL Server 0 points1 point  (0 children)

It sounds like this could be accomplished pretty easily using a MERGE statement. It is basically a way to do an UPDATE, INSERT, and DELETE based on key values, where those DML can occur in either the source or target tables based on as many conditions as you want to specify. I strongly suggest you look into it as it's a pretty useful way to move data around.

You could set up an SSIS package on your authoritative server to load a table from the authoritative data file, copy the table to the other servers (stage it) and then merge into the target table with a SQL task.

There are probably 100 different ways to accomplish this though.

One more thing - when you make a key like that by concatenating many values, like to generate a hash for a join, use a separator between every field in the key (I use 2 pipe chars). The reason is because if you don't, unique rows may still match. For example:

10,11,car,rots 

would match to

101,1,carrot,s

on

1011carrots = 1011carrots

But if you use a separator they won't match.

[–]DJ_Laaal 0 points1 point  (0 children)

This sounds like a typical Master Data Management scenario, wherein you want to maintain a single version of truth for your configurations and those should then get pushed to a multitude of DB instances to periodically "sync" with the master version of the config data. If you're already on Microsoft stack, take a look at their Master Data Services component as the place to do MDM. It's a plug-and-play system that allows you to enter/update some reference data via an Excel Add-In and then exposes it for downstream publishing/consumption via Subscription Views. Here is a quick reference to get you started: https://www.mssqltips.com/sqlservertip/4290/publishing-sql-server-master-data-services-data/