February 18, 2016 at 1:53 pm
Hey guys, I'm getting the following error when I try to run my package which contsins only an execute process task calling WinSCP.
Error: [Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe " ""/script=C:\SFTP.txt"" at "C:\Program Files (x86)\WinSCP", The process exit code was "1" while the expected was "0".
Process task settings:
Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: "/script=C:\SFTP.txt"
Working Directory: C:\Program Files (x86)\WinSCP
rest are default values
SFTP.txt code is as follows:
option batch on
option confirm off
open sftp://User:Password@My.Server.com:22
cd /foldername/foldername/foldername/foldername
option transfer binary
get *.csv \\Servername\foldername\foldername\foldername\foldername\
close
exit
Any ideas where I'm making my mistake?
February 18, 2016 at 2:37 pm
dndaughtery (2/18/2016)
Hey guys, I'm getting the following error when I try to run my package which contsins only an execute process task calling WinSCP.Error: [Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe " ""/script=C:\SFTP.txt"" at "C:\Program Files (x86)\WinSCP", The process exit code was "1" while the expected was "0".
Process task settings:
Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: "/script=C:\SFTP.txt"
Working Directory: C:\Program Files (x86)\WinSCP
rest are default values
SFTP.txt code is as follows:
option batch on
option confirm off
open sftp://User:Password@My.Server.com:22
cd /foldername/foldername/foldername/foldername
option transfer binary
get *.csv \\Servername\foldername\foldername\foldername\foldername\
close
exit
Any ideas where I'm making my mistake?
Does your command line work if you run it outside of SSIS?
February 18, 2016 at 2:39 pm
dndaughtery (2/18/2016)
Hey guys, I'm getting the following error when I try to run my package which contsins only an execute process task calling WinSCP.Error: [Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe " ""/script=C:\SFTP.txt"" at "C:\Program Files (x86)\WinSCP", The process exit code was "1" while the expected was "0".
Process task settings:
Executable: C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments: "/script=C:\SFTP.txt"
Working Directory: C:\Program Files (x86)\WinSCP
rest are default values
SFTP.txt code is as follows:
option batch on
option confirm off
open sftp://User:Password@My.Server.com:22
cd /foldername/foldername/foldername/foldername
option transfer binary
get *.csv \\Servername\foldername\foldername\foldername\foldername\
close
exit
Any ideas where I'm making my mistake?
Or does the error message give it away? Been a while since I used the EP task, but it looks like you need to change the executable to contain only WinSCP.exe.
February 19, 2016 at 7:32 am
I'm thinking it may be that I don't have the entire directory in the script file for the source folder. Every other example I've seen online shows a complete one with the drive letter included. Only problem is I don't know who to contact to find that out. We've been using FileZilla and importing them manually but would be nice to automate an ssis package to handle it
February 19, 2016 at 7:35 am
Just ran it in DOS and received an error saying Host does not exist. Now I'm thinking even more that it is the missing drive letter
February 19, 2016 at 7:37 am
dndaughtery (2/19/2016)
Just ran it in DOS and received an error saying Host does not exist. Now I'm thinking even more that it is the missing drive letter
It's usually better to use a UNC path than a drive letter (because drive letter definitions are likely to vary between users and sessions). Can you get that?
February 19, 2016 at 7:54 am
Yeah just gotta find out who the POC is. The thing that puzzles me is that we don't use the entire path when we use filezilla, shouldn't it be the same arguments with this?
February 19, 2016 at 12:53 pm
dndaughtery (2/19/2016)
Just ran it in DOS and received an error saying Host does not exist. Now I'm thinking even more that it is the missing drive letter
(It's been quite a long while since I used WinSCP, so bear with me)
This to me makes it sound more like one of two things:
1. You (when you ran it) don't have access to the target server (My.Server.com)
2. Both you and the SQL server you're trying to run this on don't have access to My.Server.com
Could be a firewall blocking the port, or possibly the server just isn't there.
Now, you did say it works when you use FileZilla, so both of those could be wrong (have you tried again recently with FZ?) Maybe try bypassing the script entirely and just running WinSCP and trying to connect. You ought to then be able to see any additional errors being thrown.
February 23, 2016 at 11:07 am
Should the access of myself and SQL Server matter if I'm supplying a username and password? I am able to use filezilla client to import the files.
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy