开发者

What to consider if using triggers on tables in a sql-server merge replication

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. The开发者_开发技巧y 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜