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_Password;sjhgjd /Par $Project::WINSCP_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.