Reputation: 1
I have a SSIS package and set Event Handler (OnError) to send me a message with logs:
"Package: " + @[System::PackageName] + "\n" +"Start Timet: " + (DT_WSTR, 40) @[System::StartTime] + "\n" +"User Name: " + @[System::UserName] + "\n" +"Machine Name: "+ @[System::MachineName] + "\n" +"Task Name: " + @[System::SourceName] + "\n" +@[System::ErrorDescription]
The problem is, it fires and sends me a message for each component, even when they run successfully. I even disabled all components temporarily, but still received emails from it. I can put all components in one big ForEach component, but as it needs much memory, I don't prefer to do that.
Furthermore, I checked all warning and fixed them as well. Rebuild the solution. Disabled / enabled all components.
Upvotes: 0
Views: 109
Reputation: 61231
Event handlers continue raising events up the chain unless told otherwise. The "otherwise" setting is a System variable named Propagate
https://learn.microsoft.com/en-us/sql/integration-services/system-variables?view=sql-server-ver16
Propagate Boolean Indicates whether the event is propagated to a higher level event handler.
Note: The value of the Propagate variable is disregarded during the validation of the package. If you set Propagate to False in a child package, this does not prevent an event from propagating up to the parent package.
Now, I have done just a bit with SSIS and even at this stage, I'd have to say my confidence in suppressing error events is still pretty low---maybe I just had weird use cases with it.
Upvotes: 0