SQL Server triggers not firing with replication
Ran into a problem today. Two SQL DBs, using transactional replication. I had some triggers created on the subscriber end that worked off insert, delete, and update operations.
The triggers worked great when inserting/updating/deleting data locally on the subscriber DB. But when a table was modified via replication, no triggers fired.
I thought replication just treated updates as a series of deletes and inserts, but the delete and insert triggers weren't firing, either.
If you're having a similar problem, first make sure your triggers don't have a "not for replication" setting. Sadly, mine don't. That's sad because a solution took a very long time to find.
The solution was a rather cryptic setting that tells replication to send updates *as* updates, rather than a delete/insert.
Read about the details and caveats here. I don't think this is the best solution, but nothing seemed to work, and nobody seems to know why this would occur.



There are no comments for this entry.
[Add Comment]