I need to create a SQL Server database that will recieve updates by some replication mechanism from another database. I need to write insert, update and delete triggers that will execute when this replilcation occurs.
I have experience with triggers but not with replication.
Should I use Transactional or Merge replication, or does it matter?
Will a trigger designed to run when a simple SQL insert statement is executed also run when replication occurs?
The CREATE TRIGGER syntax on MSDN:
CREATE TRIGGER
...
[ NOT FOR REPLICATION ]
This indicates that executing on replication is the default behaviour for triggers, and can be disabled by specifying NOT FOR REPLICATION
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With