SSIS - Script + Process task to pass values to Par

2019-07-25 07:01发布

I have an SSIS Package that has a process task to be executed which internally executes a *.bat file.

The *.bat file has a few steps that are executed.I want to feed in some of the values in the batch file as parameters %1,%2 etc

I have the structure like the following:

-username %1 -p%2

I want to pass values dynamically to this process task using a script task that would be present before the process task.

enter image description here

Please let know how this can be achieved

1条回答
时光不老,我们不散
2楼-- · 2019-07-25 08:06

Execute Process Task has Arguments property, which can be set dynamically via Expressions.

  1. Store parameters values in variables, e.g. Param1 and Param2
  2. Select Expressions property of Execute Process Task and create new expression: Property = Arguments and Expression similar to "-username " + @[User::Param1] + " -p" + @[User::Param2]. If params aren't strings you should cast them to strings.
查看更多
登录 后发表回答