Is it possible to pass parameters to a .dtsx package on the command line?

13,130

Of course yes, you can assign values to variables using dtexec

Syntax

dtexec /f mypackage.dtsx /set \package.variables[myvariable].Value;myvalue

Example

dtexec.exe /FILE "D:\TestPkg.dtsx" 
/SET \Package.Variables[User::Name].Properties[Value];"LOAD_DAILY" 
/SET \Package.Variables[User::File].Properties[Value];"D:\Load Test.txt" 
/SET \Package.Variables[User::Count].Properties[Value];5

References

Share:
13,130

Related videos on Youtube

Hoppy
Author by

Hoppy

Currently working in Melbourne, Australia.

Updated on June 04, 2022

Comments

  • Hoppy
    Hoppy almost 2 years

    I am currently executing an SSIS package (package.dtsx) from the command line using Dtexec. This is as simple as:

    dtexec /f Package.dtsx
    

    However, I have some parameters that I would like to pass to the package for it to use during execution. The documentation implies that this might be possible (i.e. the /Par parameter), but it is not clear. Is it possible to pass parameters to a .DTSX file using dtexec?