how it works not for replication in the triggers

-1

Hi, I'm trying to understand how the triggers work when you specify not for replication, if for example I have a trigger

instead of update not for replication

that works on a view and instead of updating that view what it does is update the base table but it does not stop what the

  

not for replication

greetings

    
asked by fer 31.10.2017 в 17:21
source

1 answer

0

You can find information about it here: Control Restrictions, Identities and Triggers with NOT FOR REPLICATION .

But basically, it's just something that applies when you're replicating a SQL server to another server. In that case, if the trigger gets to run during the replication process, that is often not the desired behavior and may corrupt the data on the replicated server.

For this reason, NOT FOR REPLICATION can be added to the definition of a trigger so that it does not run if data modification occurs during the replication process.

    
answered by 31.10.2017 в 18:14