DTExec:如何在 SSIS 包的参数值内使用分号

DTExec: How to use a semicolon within a parameter value for SSIS package

我刚刚从 了解到,如果在使用 DTExec 从命令行 运行 包时未正确配置参数(如果您缺少必需的参数),您的包将永远存在陷入 "Created Execution" 状态,实际上从未 运行.

使用 DTExec 时,当我在 我的 SSIS 包参数中有一个分号 时,会发生一些类似的奇怪行为。如果参数中有分号,DTExec 只是说:

"The syntax of the command is incorrect."

DTExec.exe /ISSERVER "\SSISDB\Data Feeds\Data Feed Project\Data Feed.dtsx" /SERVER "." /parameter RequiredParameter(string);parameter;value;has;semicolons

正确的语法是什么?转义分号似乎不起作用。

我得到了 this SQL Server Central post 的答复。参数name/type/value的命令行参数必须用引号引起来,然后在参数内部,参数值必须用双引号引起来:

/parameter "RequiredParameter(string);""parameter;value;has;semicolons"""

上面例子中的整个执行命令行变成:

DTExec.exe /ISSERVER "\SSISDB\Data Feeds\Data Feed Project\Data Feed.dtsx" /SERVER "." /parameter "RequiredParameter(string);""parameter;value;has;semicolons"""