Note : this will automatically update the connection name in the Execute Package Task.
Drag an Execute Package task into the Foreach Loop container.We then set the variable value to be the name of the package to be executed by the ExecutePackage task. Next, we need to add the Execute Package task to the Foreach Loop container so that this task will be executed for each package that we wish to run. Click on the Variable drop-down list and select New Variable.Under Retrieve file name select Fully qualified.Set the Enumerator to Foreach File Enumerator.Right-click on the Foreach Loop container and select Edit.Add a Foreach Loop container to the package.Load Business Intelligence Development Studio and start a SSIS project.
The first task is to create an SSIS package with a Foreach Loop container that will loop round the packages in the folder, setting a variable called “PackageToRun” to the file name for each package. SSIS control packageįor this we create a package that uses a for each loop task to call an execute package task for all packages in the folder. The folder that contains the packages is d :\TestPackages\.Īll the packages to be run have names of the format t1…….dtsx. The methods are of differing complexity and flexibility, the SSIS package being by far the most difficult to code, and the DOS command being by far the simplest but also the least flexible. This article presents three different methods of executing all packages in a folder: If the indivisual packages are placed in a folder and named in such a way that a batch can be executed via a wildcard filemask, then they can be altered without changing any code, and can be used for different processes by changing the filemask. This is especially true when one is transferring existing data from an external system. Executing all SSIS packages in a folder: three methodsĪ common requirement is to execute several SSIS packages as part of one logical process.