Excel Source validation error not firing Data Flow task fail event - ssis

I have a package with a Data Flow task containing Excel Source. DelayValidation is set to True for the Data Flow.
There is an event handler OnTaskFailed at package level. However if the Excel Source validaton fails the OnTaskFailed handler does not execute. It seems the validation error does not fire Task Failed event.
Is it possible to configure it to fire the Task Failed event?

I think in your case, instead of setting up at the package level, you should set it at the data flow task level. What I mean is, in the event handler pane you can change the executable to the certain data flow task.

Related

SSIS 2016 system variable System::ErrorDescription missing?

Using SSIs 2016 trying to set an input parameter to a sql task to System::ErrorDescription, but that variable isnt listed. Is this variable not used any longer?
I have sql task that, if it fails, I want to log the error desciption to a table. Yes, I know I can enable logging, but I want also use this message in another task.
[Edit]
I think this variable is only visible within the context of an event handler such as OnError, correct?
The System::ErrorDescription variable is not available for all components, specifically it is only in the OnError, OnInformation, and OnWarning event handlers.
https://learn.microsoft.com/en-us/sql/integration-services/system-variables?view=sql-server-2016

How to disable child package from propagating error back to parent on ssis

I have a master-child configuration. My master package calls the child package. Both the master and child have their own Event handlers which are script task which just pop up a message saying that its either "parent error" or "child error".
My aim is to cause an error on the child package and trigger my event handler which pops up a message saying "child error". The whole package execution must stop here and not allow the master package to trigger its event handler.
Is there any script task which can stop the package from further execution or any property that prevents the child from propagating the error back to the Master package? and I want the changes (Either property change/script task) to be present on the child side and not on the parent side.

Integration services : Implement onSuccess event in ssis. How to ?

I have a sequence container with multiple Execute package tasks in it. For each task what I want is to update a record in SQL table if the package executes successfully.
I looked into event handling but there is no OnSuccess event in SSIS. I have used OnError event handling for it and that seems to be working fine.
Is there a possibility to do that?
I would put the update in an execute package task right after the execute package task. If there is a failure the update will not happen.
Are you opposed to adding a component after your SQL query? This is using all scripts but the same principle can be applied if you wanted to use a Execute SQL Task or any other type of component. That way you can still run parallel, your table would be updated with ONLY the tasks that completed and your next item(s) in your control flow would still be valid
I see 2 possible ways of doing this
1: You can wrap each Execute package tasks inside its own container
and then
use precedence constraints with success and failure
2 You can inside each package handle your flow with update statements when it succeeds with constraints also.
But when your package task 1 fails, the main container will also fail and then your package will also fail, so consider setting maxmiumerrorcount to -1 or 999.
Then your MasterPackage will not fail, and your log will control for you which packages has failed.

Event Handler precedence in SSIS

I have OnPostExecute event handlers on all my control flow elements, but as soon as I put a OnError handler on the package level, I dont see the task level handlers anymore.
Is this a known bug or is it something that I am doing wrong.
This is because the OnPostExecute event handler is created at each package task. The package level indicates an OnPosteExecute event on all tasks.
What do you mean you don't see them? Do you mean that the only thing listed under Event handler in bold is the OnError for the package?
If so, fear not, all of your package OnPostExecute events still exist. The trick is the focus of your cursor when you clicked Event Handlers was on the Package. To see event handler's associated to a given Executable, either click back to the Control flow, click your given executable and then click Event Handler. The easier way is to just use the Executable selector bar and drill into it.
I had defined an OnPostExecute event on my Execute SQL Task so I clicked that and selected OK.
Now I can see the event for that Executable
If you don't want to spend your life clicking through various executables trying to find something, the Package Explorer tab is amazingly helpful in this regard and one that I find people don't use.
Here you can quickly see I defined 2 event handlers on my Execute SQL Task, one for OnPostExecute and one of OnError, in addition to the OnError event I have defined at the package level.
Finally, a quick note about order of operations. Given my scenario of OnError event handlers defined on the control flow elements and the Package level and an OnPostExecute event on the control flow elements, when my Execute SQL Task raises the error (divide by zero), I will see
"Execute SQL Task"'s OnError event fires
"so_EventHandlerRajiv"'s (package) OnError event fires
"Execute SQL Task"'s OnPostExecute event fires
So, OnError will fire before OnPostExecute and one a given Event Handler begins firing, it will percolate up to all the listening handlers.
Maybe you can use the package explorer to see all the defined event handler instead clicking on the properties of each control flow task.
mario
http://msdn.microsoft.com/en-us/library/ms190114.aspx

SSIS: OnPostExecute OnError issue

I have a SSIS package where I set the OnError and OnPostExecute event handlers.
The Package is a simple loop container and the handler OnPostExecute is working fine.
But the OnError is not actually working. Ive added some wrong-code to the task inside the Loop, just for the sake of testing the OnError handler and it's not activating. The OnPostExecute handler does work after very process inside the Loop.
On the other hand, Ive tried executing the OnError task by its own and it did work. So, it's not being activated when an error happens.
Some information. I have set the Propagate system variable to FALSE for every task inside the loop since I dont want the package to stop. (maybe this has something to do with it)
The OnError handler is at package level.
Any idea about OnError not being executed when the process finds an error?
Thanks
Check the "DisableEventHandlers" property. Make sure it is set to false on any of the tasks that it is not firing.