问题描述
我有一个带有OLE DB目标组件的SSIS数据流任务,该组件将记录插入到带有触发器的表中。当我对此表执行普通的 INSERT
语句时,将触发触发器。当我通过SSIS任务插入记录时,触发器不会触发。
如何在SSIS中触发触发器?
解决方案我有一个带有OLE DB目标组件的SSIS数据流任务,该组件将记录插入到带有触发器的表中。当我对此表执行普通的 INSERT
语句时,将触发触发器。当我通过SSIS任务插入记录时,触发器不会触发。
如何在SSIS中触发触发器?
解决方案由于OLE DB目标任务使用批量插入,因此默认情况下不会触发触发器。从:
一个必须通过其高级编辑器手动将 FIRE_TRIGGERS 指定为OLE DB组件的一部分。
然后将 FIRE_TRIGGERS添加到 FastLoadOptions 的值(请注意,选项以逗号分隔):
使用该选项,触发器应在任务执行期间触发。
I have an SSIS data flow task with an OLE DB Destination component that inserts records into a table with a trigger. When I execute a normal INSERT
statement against this table, the trigger fires. When I insert records through the SSIS task the trigger does not fire.
How can I get the trigger firing in SSIS?
Because the OLE DB Destination task uses a bulk insert, triggers are not fired by default. From BULK INSERT (MSDN):
One must manually specify FIRE_TRIGGERS as part of the OLE DB component through its Advanced Editor.
Then add "FIRE_TRIGGERS" to the value of FastLoadOptions (note that options are comma-separated):
With that option in place, the triggers should fire during the task's execution.
这篇关于为什么在SSIS插入期间我的触发器不触发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!