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)
 Single variable across multiple packages

Author  Topic 

reidkell
Starting Member

16 Posts

Posted - 2013-09-12 : 12:12:30
I have four separate import processes that, perhaps out of ignorance, I created in four separate SSIS packages. Each package calls a stored proc GetNewBatchNum(), which writes a row to tblBatch, retuning the new BatchID.

My problem is, I now want all four packages to use a single BatchID, not four different ones. How do I call my GetNewBatchNum proc once, then use the returned value for each import package? Any information appreciated.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-09-12 : 16:01:16
you could create a master package where you can move the execute proc step. Add a variable inside that to store the returned value. Then use four execute package tasks to call your current four packages. Inside child packages add a variable to get batchid and set the value using parent package variable configuration to received the value from the variable created in master package.

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

- Advertisement -