Chapter 36. Configuring Child Packages

After creating many packages in your environment you may realize that you have the same tasks performing the exact same functions in multiple packages. This kind of repetition can be simplified with a child package. A child package is a package called from another package. The package calling the child package is called a parent package. The parent package calls the child package by using the Execute Package Task in the Control Flow.

The Execute Package Task can be placed anywhere in the Control Flow of a parent package just like any of the tasks in the Toolbox. You can use expressions and precedence constraints to decide if the Execute Package Task runs in the parent package, allowing you to control when and if the child package executes. The child package does not have to be the last task in the parent package.

If the Execute Package Task is not the last task in the parent package, then after the child package completes, the parent package resumes at the point after the Execute Package Task. If the child package runs successfully, the parent package continues as if the tasks completed successfully just like any other task in the Control Flow. If the child package fails, the Execute Package Task reports failure. If the precedence constraint coming from a failed Execute Package Task is set to success, the next task in the Control Flow of the parent package is not executed.

When a child package fails to run, the parent package does not report the ...

Get Knight's 24-Hour Trainer: Microsoft® SQL Server® 2008 Integration Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.