dbTalk Databases Forums  

Best way to pass in parameter to Master SSIS package

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Best way to pass in parameter to Master SSIS package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
hfdev
 
Posts: n/a

Default Best way to pass in parameter to Master SSIS package - 12-02-2008 , 10:40 AM






Hello,

I have created a master SSIS package that is responsible for running
numerous child packages based on configuration data stored in a SQL table. I
use a recordset destination to obtain the list of child packages and then
iterate over it in a foreach loop container, then I use a execute package
task to execute each child package and then update the LastRunDate column in
the SQL table to reflect the last time the child package was run. Also, if
the child package fails, I email my team which which child package failed.

I want to be able to schedule the master package to run on different
schedules and pass in a variable during runtime that tells this master
package which child packages to run. The parameter that I need to pass in is
of type int.

Currently the child packages are broken up into 3 different groups and this
is denoted by a field in the SQL table that is of type int denoted by the
values 1,2,3.

I think it is possible to pass in parameters to a package via a XML
configuration file. Is this the best way to go about this? If so, does this
mean that I need to create 3 different configuration files; one for each
integer value? If not, is there an easlier way to pass in a parameter of
type int to a package that is scheduled to run via SQL Agent job?

Thanks for the insight,

--
Josh Blair (hfdev)
HydraForce, Inc.

Reply With Quote
  #2  
Old   
hfdev
 
Posts: n/a

Default RE: Best way to pass in parameter to Master SSIS package - 02-19-2009 , 12:46 PM






I figured this out. It is the Set Values tab of the Job Step Properties
dialog that is available when you schedule and SSIS package.


Here is an example of the way my parameter is constructed:

\Package.Variables[User::ScheduleTypeID].Properties[Value]

HTH someone else,

--
Josh Blair (hfdev)
HydraForce, Inc.


"hfdev" wrote:

Quote:
Hello,

I have created a master SSIS package that is responsible for running
numerous child packages based on configuration data stored in a SQL table. I
use a recordset destination to obtain the list of child packages and then
iterate over it in a foreach loop container, then I use a execute package
task to execute each child package and then update the LastRunDate column in
the SQL table to reflect the last time the child package was run. Also, if
the child package fails, I email my team which which child package failed.

I want to be able to schedule the master package to run on different
schedules and pass in a variable during runtime that tells this master
package which child packages to run. The parameter that I need to pass in is
of type int.

Currently the child packages are broken up into 3 different groups and this
is denoted by a field in the SQL table that is of type int denoted by the
values 1,2,3.

I think it is possible to pass in parameters to a package via a XML
configuration file. Is this the best way to go about this? If so, does this
mean that I need to create 3 different configuration files; one for each
integer value? If not, is there an easlier way to pass in a parameter of
type int to a package that is scheduled to run via SQL Agent job?

Thanks for the insight,

--
Josh Blair (hfdev)
HydraForce, Inc.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.