Is it possible to replicate a trigger but prevent it from running during synchronisation?

We are using SQL Server 2008r2 as the publisher and Express editions as subscribers, with merge replication and pull subscriptions.

A replicated table has an update timestamp, as a datetime column. Its default value is GETDATE() and the table has a trigger to update the date whenever anything else in the row changes.

We need this trigger to exist and update the timestamp both on publisher and subscribers, so we can't use NOT FOR REPLICATION for it.

However, whenever the subscriber synchronises, the timestamp on all rows gets updated to the synchronisation time, while we want it to be the same value that exists on the publisher (unless the subscriber changes the row).

Is it possible to replicate the trigger but prevent it from running during synchronisation?


Category: sql server Time: 2016-07-29 Views: 3

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.225 (s). 12 q(s)