为什么在SSIS插入期间我的触发器不触发? [英] Why aren't my triggers firing during an insert by SSIS?

查看:88
本文介绍了为什么在SSIS插入期间我的触发器不触发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有OLE DB目标组件的SSIS数据流任务,该组件将记录插入到带有触发器的表中。当我对此表执行普通的 INSERT 语句时,将触发触发器。当我通过SSIS任务插入记录时,触发器不会触发。



如何在SSIS中触发触发器?

解决方案

由于OLE DB目标任务使用批量插入,因此默认情况下不会触发触发器。从批量插入(MSDN)


如果未指定FIRE_TRIGGERS,则不会执行插入触发器。


一个必须通过其高级编辑器手动将 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):

If FIRE_TRIGGERS is not specified, no insert triggers execute.

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插入期间我的触发器不触发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆