Search This Blog

Thursday, February 21, 2013

How to pass a variable to an SSIS package on execute?

Q:  How to pass a variable to an SSIS package on execute?

A:  A few ways.  One can execute via a command line and designate the variable value, execute via SQL Agent and pass the value or use a config file.  I'm going to demo the 1st two below.

Execute via SQL Agent:



Or via command line:
*note: this example uses a SSIS package stored in a file folder.

/FILE "C:\SSIS\projects\SSIS_PKG.dtsx"  /CHECKPOINTING OFF /SET "\Package.Variables[User::myvar].Properties[Value]";myvalue /REPORTING E

No comments:

Post a Comment