Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: SQL Server job fails when passing parameters

This does not look like WinSCP question.
You have correctly posted it on "Database Administrators Stack Exchange":
https://dba.stackexchange.com/q/201817/83075
gtamnfm

SQL Server job fails when passing parameters

I am using WinSCP inside SSIS Execute task for downloading and moving the file in FTP location. It works great through visual studio.I am passing parameters inside the SQL Server Agent job and the package is getting failed. Here is what I am getting:

Executed as user: xyz. Microsoft (R) SQL Server Execute Package Utility Version 13.0.1601.5 for 32-bit Copyright (C) 2016 Microsoft. All rights reserved. Option "/script= /Par $Project::WINSCP_FileDestParam;\\filedest\dest /Par $Project::WINSCP_ScriptFile;D:\Temp\Script.txt /Par $Project::WINSCP_HostName;ftp.com /Par $Project::WINSCP_Skillport_Password;sjhgjd /Par $Project::WINSCP_Skillport_UserName;usname /Par $ServerOption::LOGGING_LEVEL(Int16);1 /Par $ServerOption::SYNCHRONIZED(Boolean);True /CALLERINFO SQLAGENT /REPORTING E " is not valid. The command line parameters are invalid. The step failed.

I have the parameters scripted the script.txt file and passing the parameters through SQL Server Agent job. This works when I am running through Visual Studio but not through SQL Server Management Studio.

Any help would be greatly appreciated.