2

My SSIS package has a project parameter called SMTPServer. I pass that parameter like below when executing dtexec:

"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server 
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx"  /Par 
"$Project::SMTPServer";\""Smtp.my.smtp-server"\"

But, I am getting the error:

Option "$Project::SMTPServer;Smtp.my.smtp-server" is not valid.

How can I fix this?

Hadi
  • 36,233
  • 13
  • 65
  • 124
faujong
  • 949
  • 4
  • 24
  • 40

1 Answers1

0

Trying to figure out the issue

(1) Try fixing the the quotations:

"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server 
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx"  /Par 
"$Project::SMTPServer";"Smtp.my.smtp-server"

Or

"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server 
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx"  /Par 
"$Project::SMTPServer";"\"Smtp.my.smtp-server\""

(2) Or Without the quotations:

"E:\Program Files\Microsoft SQL Server\110\DTS\binn\dtexec" /Server 
{myDBServer} /ISServer "\SSISDB\mySSIS.dtsx"  /Par 
"$Project::SMTPServer";Smtp.my.smtp-server

(3) Or try to use /SET option: (not sure if this will works in this case)

"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"\"

Related Links

Hadi
  • 36,233
  • 13
  • 65
  • 124
  • Thank you for your reply. Turns out I forgot to add /par before "$Project::SMTPServer";\""Smtp.my.smtp-server"\" – faujong Mar 15 '19 at 14:08