DTEXEC with multiple Variables passed in

  • When I attempt to run my SSIS Pkg using DTEXEC (with 2 variables passed in) I receive the error msg:

    ... The argument "\package.variables[pDestFile].Value;"C:\MyFileName.csv " has mismatched quotes.

    Here is my DTExec Statement:

    dtexec /f \\MySQLServer\SSISDir\MySSISpkg.dtsx /set \package.variables[pActiveDate].Value;"\"20090724"" /set \package.variables[pDestFile].Value;"\"C:\MyFileName.csv""

    Can anyone pinpoint my syntax error?

    BT
  • looks like it should be:

    Value;"\"C:\MyFileName.csv\""

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Matt - thanks. The missing "\" (suffix) was exactly my problem.

    Appreciate you looking & resolving this for me.

    BT
  • Hi Everyone

    Here's something that worked for me, I wanted to share it just in case someone is looking for an alternative.

    @ECHO OFF

    dtexec /FILE "{package location}" /CHECKPOINTING OFF /REPORTING EW /SET "\Package.Variables[User::{flatfile location variable}].Properties[Value]";"\\{UNC path}\\" /CONNECTION {Db connection 1};"trusted_connection=yes;Database={db name};Server={server name};Provider=SQLNCLI;" /CONNECTION {Db connection 2};"trusted_connection=yes;Database={db name};Server={server name};Provider=SQLNCLI;"

    *Replace the values within the [font="Arial"]{ }..(braces included)[/font] with actual values.

    Please note that all of this has to be on one single line for it work.

    Regards

    Shivashish Das

    All good movies deserve a SQL.

Viewing 4 posts - 1 through 3 (of 3 total)

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