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

1

13

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?

Criticize answered 29/1, 2018 at 23:12 Comment(1)
Whats not clear? did you try it?Tectonics
V
18

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

Venice answered 29/1, 2018 at 23:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.