In a reporting or HA environment the triggers are disabled on target. In HA environment they are enabled prior to failing over to the secondary (also termed as target in this discussion). The reason is detailed in Admin Guide chapter titled "Planning SharePlex replication" section titled "Triggers". In nutshell, since the triggers are enabled on source, any DML generated by them is sent to target with the assumption that the table is replicated. If the triggers are also enabled on target, then they will result in the same DML created on target. This will result in out of sync errors on target. For this reason it is advised that the triggers be disabled in such environment. However, in a peer-to-peer environment it is required to enable the triggers. This is to let Shareplex ignore the trigger for any DML done by Shareplex user but to let the trigger fire for any other user.
There is a script named sp_add_trigger.sql that will modify ALL the triggers if invoked and the script resides in util subdirectory of the Shareplex product directory. Since it modifies ALL triggers located on that node, the users may want to control which triggers need to be modified and may want to do the modification manually since the script cannot do that. Moreover, the script only works for row level triggers and not for statement level triggers so the statement level triggers still need to be modified manually.
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center