Error while running SQL Agent job(SSIS) after set value in Set Values tab of package

  • Buddies,

    I created a job with five SSIS packages in SQL Server Agent->Jobs folder. If I run the job it is working fine. And I wanted to change a package level variable called User::tempFilePath by job properties -> Steps -> package say( bulk copy) -> Set Values tab:

    Property Path as \Package.Variables[User::tempFilePath].Properties[Value] and Value as D:\temp\. Then if I select Command line tab, I can see the following arguments [p]/FILE "C:\Reports\SSIS\SSIS_01\BulkCopy.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[User::tempFilePath].Properties[Value]";"D:\temp\" /REPORTING E[/p]

    If I run the job now, I'm getting the following error:[p]The argument "\Package.Variables[User::tempFilePath].Properties[Value];D:\temp" /REPORTING E " has mismatched quotes. The command line parameters are invalid. The step failed.[/p]

    Can anybody suggest me how to resolve this issue..?

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • [p]Any suggestions please.. :pinch:[/p]

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • [p]Or may I know how to pass value to a package level variable in SSIS Agent job..?

    Any suggestions please..[/p]

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • Maybe double up the \ so it is D:\\temp

    CEWII

  • [p]Hhhhh.. finally got it.

    Thank you Mr. Elliott for your suggestion, it worked.

    solution for this problem is: D:\temp\[/p]

    KSB
    -----------------------------
    Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha

  • Great to hear you got it worked out.

    CEWII

  • I had the same issue:

    "The argument "\Package.Variables[ArchivePath].Value;D:\Teamcorp\APLExtractArchive" ... has mismatched quotes. The command line parameters are invalid. The step failed."

    The value set was "D:\Teamcorp\APLExtractArchive\" and the error message had the ending "\" missing from the value. My guess is that the script interpreted \" as an escape character resulting in a missing quote.

    So I changed the value "D:\Teamcorp\APLExtractArchive\" to "D:\Teamcorp\APLExtractArchive\\" only doubling the ending backslash and that solved the problem.

    Thanks for posting the solution Elliott!

  • Sweeeeet...

    Elliott, you are the man!

    Thanks for the help,

    Jim

  • You guys are very welcome, always happy to help.

    CEWII

  • Thanks for the help! I thought maybe you had to double up all backslashes but just the last one was the key.

    Steve

  • Hey you are awesome Man 🙂

    its Friday Midnight i was fighting this this issue your solution saved my week-end.

    thanks a ton keep it up 😀

  • wow, old thread, glad to be of help.

    CEWII

  • Cheers, you're still saving people 😀

    Was convinced it was spaces in a variable used for a folder path breaking stuff, but I just needed the \\ on the end.

  • Thanks, this thread from 7 years ago helped me out today.   I have a package that has some project parameters.  It ran great from visual studio... it even ran great when I deployed it to our server and set it up in a SQL job.   The job/package failed when I went in to the job and overrode the project parameters (I needed to put in new values to run the package in our QA environment).   What finally worked was using a double \\ at the end of the project parameter where I was setting the file source, and destination paths.

  • And still helping after all that time. Same issue as above:  package configuration is overridden in Agent Job where a slash is part of a file path. Setting the parameters correctly in the base package fixes the issue as well as adding a double slash at the end of the file path in the Agent Job.

    Thanks for taking the time to share your solutions!

Viewing 15 posts - 1 through 14 (of 14 total)

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