Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the fireAgain parameter in the Dts.Events.FireInformation method?

When firing Integration Services events from a script, I stumble a little on the FireInformation method from Microsoft.SqlServer.Dts.Tasks.ScriptTask.EventsObjectWrapper Dts property on Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase. The last parameter, fireAgain, is passed by reference. The documentation explains, "True to continue firing; otherwise, false." Why pass the parameter by reference? Are there conditions where the method set the value to true and require the caller to repeat the call? If the caller sets the value to false, what are the implications?

like image 789
sean woodward Avatar asked Oct 22 '14 14:10

sean woodward


1 Answers

The reason the FirstInformation provides a mechanism for suppressing further events is the cost. Raising events can be costly and given that by definition, these messages are informational in nature, it makes sense to allow log providers, or custom tasks to stop raising the event.

From 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.

like image 164
billinkc Avatar answered Nov 15 '22 07:11

billinkc