Disabling triggers

All existing base triggers should have a call to the dbo.SkipBaseTrigger() function at the beginning of the code. If the function returns a value of 1, the trigger code should exit. This allows inbound replicated data to avoid the validations and processing associated with the base table’s trigger.

The way some triggers work makes it impossible to allow them to fire. For example, a base table trigger might insert into another table (Table X), which would then collide with the data being replicated for Table X. Since tables are grouped by categories, if a trigger changes other pertinent data in another table, that table should be in the same category as the base table for the trigger.

If the base table has an associated _all table that is maintained within the same trigger, the generated trigger logic calls the dbo.SkipAllUpdate() function. This allows the _all table to be populated if desired, even though the rest of the base trigger logic does not fire.