sql-serverparametersssisssis-2012dtexec

Passing Project parameter to dtexec


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?


Solution

  • 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