November 12, 2009 at 4:59 am
Hello every one,
I have trigger(insert/delete) on replicated table . Im sure when replicating Bulk copy is used. As you all must be aware we need to set the batch size to be 1 if we want to fire trigger for each row insertion/deletion. Is there any way I can specify this condition during replication?
Ta
November 12, 2009 at 5:47 am
What type of replication are you talking about?
Transactional and merge replication don't necessarily use BCP (apart from the initial snapshot).
November 12, 2009 at 5:48 am
If you are using transaction replication, it has two phases: During the initial setup, snapshot replication is set and it does not care about triggers.
When you add/update/delete rows after setting up the replication (after the snapshot is created) log reader reads the data (row by row) and inserts in the order using specific replication procedures. that means, replication will work on a single row at a time. Your triggers will fire for each row on replicated table irrespective of how you inserted the data in source table.
Hope this helps
Cheers,
Prithiviraj Kulasingham
http://preethiviraj.blogspot.com/
November 12, 2009 at 6:03 am
Well said... Im using transactional replication.
Ta
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply