SQL agent job running SSIS package (command line)

  • Hi,

    I'm trying to execute an SSIS package using a SQL job. The job runs using the SQL service account (sa privileges).

    I pass a parameter through command line. Syntax as below:

    /DTS "\MSDB\<dtsx package- name" /SERVER "<server-name>" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[Location].Value";"T:\" /REPORTING E

    But on executing the job, the output says -

    Option " /SET" is not valid. The command line parameters are invalid. The step failed.

    * Can someone get me rid of this error and help me succeed in my job.

    Thanks!

  • Did you type this in, or was this generated by the "Set values" tab in the step of the job?

    Hope this helps,
    Rich

    [p]
    [/p]

  • If you are using the OS Command instead of SSIS your command line should look something like this:

    dtexec /F Package1.dtsx /SET "\Package.Variables[User::Variable1].Properties[Value]";4

    /SET "\Package.Variables[User::Variable2].Properties[Value]";5

    CEWII

  • Hi Elliot,

    The above syntax generated itself despite my adding the Set statement.

  • Hi Elliot,

    The above syntax is generated despite my expicitly defining the set option -

    /DTS "\MSDB\Package1" /SET "\Package.Variables[variable name].Value";"T:\"

  • hi there,

    I'm also running my package via a job with command line script, and it's all working fine. However, as soon as i add more than one step to the job, i.e. to execute additional packages in the same manner, the job simply doesn't run on a schedule. when i run the job manually, it pops up a screen asking at which step to start, although i have set the startup step and the flow of the steps.

    I'm thinking this could be causing the job to not run. when i look at the job history, the schedule simply didn't fire. when executing manually, everything works fine, so no problem with the job itself???

    because the schedule doens't start the package , there is no error msg at all to see what could be the reason.

  • It is normal that when you want to run a job manually, you get a pop-up asking you at which step to start.

    That way you can skip steps if you want. So that is certainly not causing the issue.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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