Resume Parent package even Child Package fails - ssis

I am using Execute Package Task in my job to call my child Packages. I use an execute SQL Task to get my file location and file name to load the file into my tables.
Once I get these details I'll pass this information to my Execute Package task, where upon it calls my child Package.
My query triggers 2 input files, which has to be loaded into my tables.
For example, let us assume file1.csv and file2.csv has to be loaded. So when file1.csv is loading, if there is any error in my child package, my child package fails and my parent package does too. It should not happen like that; if my file1.csv fails to load, my child package and parent package should not fail and should continue loading file2.csv.
For this I tried changing the Propagate System variable value to false for execute Package task for On Error Event, still I couldn't solve the problem.

You can
Handling the error by setting up a failure path after the task that possibly fails
Set the MaximumErrorCount to a higher value (click into the background of your control view and go to properties)

Related

SSIS ForceExecutionResult not working

I have a package, inside which contains a script task, due to probably C# library issues in some of the servers, this task may success in some machines but fail in others (reporting Cannot load script for execution).
I want to force the task to be success by setting the ForceExecutionResult = Success option for this task. However when running, I found this doesn't work, the task still fails in the old-fashioned way.
I don't want to modify the MaxErrorCount for package because I want to reveal errors from other components, in the meanwhile, even this script task fails during validation, I want the package report success, is there any way to make the solution?
To let your package continue execution, you can set the DelayValidation property to True on the Script Task (so the package will begin executing), then on the Precedence Constraint that follows this Script Task, set it to continue on completion, instead of success.

SSIS Execute Package task notification if path does not exist

I have created a master control package that calls several packages using the execute package task control. I have set all the package file locations to use a sql config table which contains the file location and then used an expression to include the package name. Everything works as expected however I want to include some handlers to notify me if the package location does not exist (just in case somebody changes the path in the config table). To test I set an incorrect file name in one of the expressions which turned the execute package task control red as expected however I can't figure out how to add the notification task. I have tried all the error handler events assocaited with it but no joy plus I added a mail task to the task in question for failure and this did not execute!
Any advice greatly appreciated.
Thanks.
That's why you have OnError event handler, just configure it properly. Are you sure, you're checking Event Handlers for the package and not for one of the blocks inside?
There's a plenty of system variables with OnError scope. Check grey x in Variable window to see them. You might want to use:
- ErrorDescription
- ErrorCode
- SourceName
but choose them according to the report format.
Now in event handler create a script which will put a message into a new variable, and finally send it with send mail task.

SSIS 2008 User Variable in Expression for Execute Process Task

I have an SSIS 2008 package.
I have 3 user variables in the package. One is for an the environment, one is for the path for an executable, and the other is part of a message for an email.
I have a Script Task that sets the variable for the path (strAppPath) based on the environment variable.
strAppPath is used in an expression for the Executable property of an Execute Process Task. The job fails stating that the executable path for the Execute Process Task is not set.
I'm assuming that it is checking this path before the Script Task sets the variable.
Is there a way to work around this?
Right click on your Execute Process Task and select Properties. In the properties window, you will have a DelayValidation option that is currently set to False Flip that to True.
What is happening is that when the package starts, it goes through a validation phase to ensure everything is kosher before it begins (no need to start processing if something is broken). In your case, that full validation is not desired as the Execute Process Task won't be valid until right before it's time to run. The validation will occur, just that it is delayed until it is time for the task to begin. Make sense?

How can i stop the package with more than 1 dataflow if the first fail?

I've a SSIS package with more than 1 data Flow, If the 1st Dataflow fail I don't want to execute the follows. How can I stop the execution of the package. I tried using red arrow and script task doing nothing but I it doesn't work. the others dataflows are executed as well getting all the errors to my .net client. I need only the error for the Data flow that fail.
Anyone know how can I get it
Thanks
You can set MaximumErrorCount To 1 on your data flow task, but this is the default value. Same goes for the value at package level, if you set this to 1, the package terminates with error if you task fails.
But as i said, these are default values and you shouldn't have anything to do. Do you execute the data flow tasks all together? If you do, build one path which executes all the tasks after another.
You can use the Squence Container and put all the data flow task in it. I have shared the screen shot of the sample, adjust the priority for all the data flow task and put sucess condition for the tasks.

Ignore errors on Execute Package task in SSIS

In an SSIS package, I have a For Loop Container task with the EvalExpression set to true (so that it runs forever). If any tasks inside the For Loop Container fail, then the package must fail -- except for the Execute Package task (that calls a child package). If that fails, then the parent package should move onto the next task.
I tried setting the MaximumErrorCount of the Execute Package task to 0, but that didn't help.
I tried setting the MaximumErrorCount of the For Loop Container task to 0, but that ignores the errors of all the tasks within the For Loop Container task.
Any idea how I can ignore errors on only the Execute Package task -- within a For Loop Container.
A better way to do this is to go to the OnError handler of your execute package task and set the System variable "Propogate" to false. This will stop the error from bubbling upwards to your loop container.
The answer is to use the FailPackageOnFailure property for all the tasks that should cause the package to stop and set the MaximumErrorCount of the For Loop Container task to 0.
I got the answer here:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&query=Ignore+errors+on+Execute+Package+task+in+SSIS&lang=en&cr=&guid=&sloc=en-us&dg=microsoft.public.sqlserver.dts&p=1&tid=6406db48-a2cb-4b0d-a124-4892e976a583
Go to "Event Handlers" on top
On the left side choose required "Executable:"
Go to "Event Handlers" on top
In the middle click on "Click here to create 'OnError' event handler for executable 'xxx'
Go to "Package Explorer", find newly created 'OnError' event -> Variables -> Propogate
In the properties change value to "false"
Done