我的SSIS包有一个名为SMTPServer的项目参数。 我在执行dtexec时像下面那样传递该参数:
"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx" /Par
"$Project::SMTPServer";\""Smtp.my.smtp-server"\"
但是,我得到了错误:
选项“ $ Project :: SMTPServer; Smtp.my.smtp-server”无效。
我该如何解决?
答案 0 :(得分:0)
(1)尝试修正引号:
"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx" /Par
"$Project::SMTPServer";"Smtp.my.smtp-server"
或
"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx" /Par
"$Project::SMTPServer";"\"Smtp.my.smtp-server\""
(2)或不带引号:
"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx" /Par
"$Project::SMTPServer";Smtp.my.smtp-server
(3)或尝试使用/SET
选项: (不确定在这种情况下是否可行)
"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx" /SET
\Package.Variables[$Project::SMTPServer];\""Smtp.my.smtp-server"\"
相关链接