Changed SSIS Package Value in Job Step, now get DTExec: Could not set \package.Variables[name].Value error RRS feed

  • Question

  • I'm having a weird SSIS problem (big surprise, I know).

    I have a package that passes a value to a stored procedure.  We set the value in the Set Values tab of the Job Step like this:

    Property Path: \package.Variables[IncrementDays].Value

    Value: -2

    This has worked just fine for many days now.  Then we reset the value to -20 (look back 20 days).  When we ran the job we got the following error:

    DTEXEC: Could not set \package.Variables[IncrementDays].Value to -20.  The step failed.

    SO we set it back to -2, reran and got the same basic message.  Then we removed the variable from the Set values list (and when with the default value of the parameter in the stored procedure).  It ran with no errors.  We put the variable back in the Set values tab list, and once again got the error.

    This was all in our production environment.  I could not get it to fail in our development environment.  And we've reset other values for this job step with no problems.  I'm stumped.

    One thing: our development server is running SQL 2008 and our production server is running SQL 2012.

    Thanks for any help.

    Friday, August 25, 2017 6:49 PM

All replies

  • Hi Brian,

    Are able get proper result to passing -20 to store procedure ? try run in ssms .

    Mssql installation on Centos

    Friday, August 25, 2017 8:11 PM
  • Hi Brian Levine,

    Please try to use batch file (via Dtexec) directly to execute the package and set the value of variable dynamically, check if the issue persist.

    I suspect the command generated by SQL Agent is not correct, please share the full command with us for more analysis. You could right click your job->Script Job as->Create to->New Query Editor Window. Find the @command parameter and share the value with us.


    Pirlo Zhang

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, August 28, 2017 8:54 AM
  • thanks for your post - I was looking for the syntax of the Property path field of the job step dialog - and your post did the trick!



    Wednesday, February 28, 2018 6:18 AM