EXECUTE SSIS Pacakge from command line with environment variables

  • hi,

    I am trying to execute ssis package from command line. I also tried to pass environmnet variables like below. Not sure what is wrong?

    Also is there a way that we can execute package using sql? if so how?

    example:

    Command line :

    dtexec/ISServer "\SSISDB\Folder\Foldername\"Packagename" /Server "Servername" /ENVREFERENCE "Environmentname foldername"

    This above command is not working 🙁 . error: execute package failed because of error 0x80131537. Input string is not correct format.

     

     

     

  • Executing an SSIS package from T-SQL is straightforward, see link.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • dtexec/ISServer "\SSISDB\Folder\Foldername\"Packagename" /Server "Servername" /ENVREFERENCE "Environmentname foldername"

    Quotes look wrong, instead of \SSISDB\Folder\Foldername\"Packagename"

    I think you'd want "\SSISDB\Folder\Foldername\Packagename"

     

  • Still same issue. Is it how you pass environment varibles correctly? I just specified folder name ? do we need to give path sepcifically?

    • This reply was modified 2 years, 7 months ago by  komal145.
  • Envreference should be a number, I think. Here is an example from MS:

    DTExec /ISSERVER "\SSISDB\folderB\Integration Services Project17\Package.dtsx" /SERVER "." /Envreference 2 /Par "$Project::ProjectParameter(Int32)";1 /Par "Parameter(Int32)";21 /Par "CM.sqlcldb2.SSIS_repro.InitialCatalog";ssisdb /Par "$ServerOption::SYNCHRONIZED(Boolean)";True

    • This reply was modified 2 years, 7 months ago by  Phil Parkin.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Thanks working.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply