O
O
Oxoron2014-07-30 10:59:22
SQL Server
Oxoron, 2014-07-30 10:59:22

How to combine triggers and Change Tracking (merge) on MS SQL Server 2012?

Good afternoon.
There are two databases that are synchronized using Change Tracking. The data from the first is uploaded to a file, then it is taken to the remote taiga on a flash drive, after which it is loaded into the second with the merge command.
Problem: when adding data, merge does not fire triggers.
Whether it is possible to make so that triggers worked at addition of the data merge?
Suggested bikes are also welcome.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oxoron, 2014-08-07
@Oxoron

Of the more or less viable solutions: modify the merge script, determining the changed data and its type, and then run the trigger procedures. There is a set of problems with determining the type (if the key data has changed in both databases), repeated triggering is possible, with a small Retention period (2 days by default), some information about changes may disappear altogether.
Another solution: abandon one of the technologies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question