views:

19

answers:

1

Hi,

i am driving since some years a sql-server2000 merge-replication over three locations. Triggers do a lot of work in this database. i got no troubles.

Now migrating these database to a brand new sql2008, i got some issues about the triggers. They are firing even if the merge-agent does his work.

Is there anybody who has some experience with that kind of stuff on sql2008-server? Can anybody confirm that different behaviour to sql2000?

Peace

Ice

+2  A: 

give this a read: Controlling Constraints, Identities, and Triggers with NOT FOR REPLICATION

In most cases the default settings are appropriate, but they can be changed if an application requires different behavior. The main area to consider is triggers. For example, if you define an insert trigger with the NOT FOR REPLICATION option set, all user inserts fire the trigger, but inserts from replication agents do not. Consider a trigger that inserts data into a tracking table: when the user inserts the row originally, it is appropriate for the trigger to fire and enter a row into the tracking table, but the trigger should not fire when that data is replicated to the Subscriber, because it would result in an unnecessary row being inserted in the tracking table.

KM
Thanks to this explanation, you mean that the triggers under sql2000 are by default 'not for replication'. In sql2008 one have to set this option explicit. That's the change how to make things work under sql2008?
Ice

related questions