Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Package calling other package and passing back the

Author  Topic 

aakcse
Aged Yak Warrior

570 Posts

Posted - 2014-06-12 : 23:43:05
I have to loop through n number of package from a master package, any idea how to implement this?

Master package Calling child package in for each loop , here I need to loop through n no or rec from a table and each record needs a call to child package and return control back to calling pkg.. need to do this till the end of all the records in a table.

Child package1 -- Called perform some task and return control back to master package

Child package2 -- Called perform some task and return control back to master package

Child package n -- Called perform some task and return control back to master package

Thanks

-Neil

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-06-21 : 06:09:21
you can set it up using below work flow
1. Have a execute sql task which will execute query and store the result in a recordset variable created in SSIS
2. Have a for each loop with ADO enumerator pointing to the recordset variable to iterate through the values in the resultset. Use other variables with corresponding datatypes to get individual values out within the loop
3. Add a execute package task inside loop and map the variable with package path to connection string property to execute the corresponding child package.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -