Order of Execution of SSIS tasks

  • I have an SSIS package that has 3 Data Flow Tasks, an Execute Process Task, and two For Each containers, each with one task inside. The first For Each container has an FTP task inside, and the second For Each container has a File System Task.

    I want the 3 Data Flow Tasks to fire first, then the Execute Process Task and then each For Each Container, and I have set up the Precedence Constraint arrows to run in that order for Success (the green arrows.) However, when I run my package, the 3 Data Flow tasks run first as they should, but the FTP Task (which is inside the first For Each container) runs at the same time. the FTP Task completely ignores the fact that it is in a For Each loop and it should run only after the successful completion of the Execute Process Task.

    Why is this happening and how can I get the FTP task to run within the For Each container and only after the Execute Process task, and not at the beginning of the execution of the package???? :unsure:

    A screenshot is attached that illustrates my point. Thanks for your time!!!

  • First off, you need a precedence constraint between Export SBISCLPRICELIST and Rename Files.

    Please will you double-click on the precedence constraint between Rename Files and FTP Each File and post a shot of that?

    Thanks

    John

  • Thanks 🙂 But no, I don't need a precedence constraint between the Export SBISCLPRICELIST and the RENAME FILES because the files that are to be renamed aren't involved in the Export SBISCLPRICELIST task. That task runs separately and isn't linked to the Rename files.

    I've attached the screenshot u asked for.

    I think I might have solved this tho, by right clicking the FTP Each File Container and selecting "Add a Precedence Constraint" and then adding one from the From Each container to the FTP Task. (I attached a screenshot of th

    It runs in sequence now, but I'm still not getting the FTP Task to work correctly. Maybe I should close this topic and open a new one?

  • If your FTP connection is dependant on any of the other tasks you can get this, even though the precedence constraints are in place, unless you delay the validation of the FTP tasks. If this is the case, click on your FTP task and set the DelayValidation property to True.

  • bajanpoet (11/24/2010)


    the FTP Task completely ignores the fact that it is in a For Each loop and it should run only after the successful completion of the Execute Process Task.

    Try dragging the ftp task to a spot on the background, then back into the foreach loop. It sounds like it didn't register it was part of a subcontainer. Could be a misclick, could be SSIS being fussy.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • I've tried dragging the FTP Task out of the ForEach loop, but I get an error. Will update more in the morning once I get back to my desk.

  • Trying to drag it out of the sub container I see this error: "The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of a package and the element is not there."

    Will try deleting the FTP Task and recreating it and seeing if that helps.

  • Recreating the FTP Task and placing it into the ForEach container worked like a charm! Didn't even consider that the SSIS would have had an error recognizing that the task was in a sub-container. I recreated it and ran it and it's all good! :w00t:

    Thanks again!!!!!!!!!

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply