sql-server - Dts.Events.FireInformation 方法中的 fireAgain 参数的用途是什么?

标签 sql-server ssis dts

从脚本触发 Integration Services 事件时,我偶然发现了 Microsoft.SqlServer.Dts.Tasks.ScriptTask.EventsObjectWrapper Dts 属性(Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase)中的 FireInformation 方法。最后一个参数 fireAgain 通过引用传递。 documentation解释说:“继续射击为真;否则为假。”为什么要通过引用传递参数?是否存在该方法将值设置为 true 并要求调用者重复调用的条件?如果调用者将该值设置为 false,会产生什么影响?

最佳答案

FirstInformation 提供抑制进一步事件的机制的原因是成本。引发事件的成本可能很高,并且根据定义,这些消息本质上是信息性的,因此允许日志提供程序或自定义任务停止引发事件是有意义的。

来自IDTSComponentEvents.FireInformation Method

Because firing of an event may be expensive, the run-time engine provides a mechanism for suppressing events that you are not interested in. Every event firing method has a FireAgain parameter. If the value of this variable is false, after the method returns, the caller will not fire this event again for the duration of the current execution.

关于sql-server - Dts.Events.FireInformation 方法中的 fireAgain 参数的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26510450/

相关文章:

c# - Visual Studio : automatically attach debugger to process as soon as process starts

sql - 由于排序规则不匹配,对两个数据库的查询有错误

sql-server - 从 Excel 工作表将数据插入 SQL 表

c# - 将 SQL 查询转换为 LINQ 查询,但仅选择特定值返回

sql-server - 有谁知道将 DTS 迁移到 SSIS 的方法吗?

.net - 尝试在 VB .NET 中执行 DTS 包时出现 "Invalid class string"

sql-server - 如何获取当前 session 的日期格式

ssis - 如何从 SQL Server 代理作业读取 ssis 中的项目连接?

sql - 如何在select语句中使用变量?