1

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.

  • 1
    Does that string of arguments work when you call dtexec from the command line using those arguments? Can you post the agent job definition? I think you just have an error in the way you try to pass parameters – Tom V Mar 21 '18 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.