Topic "SSIS Execute Process Task failing to upload files"

Author Message
Guest




I need some help in getting ssis sql server 2008 R2 to use winSCP. I had tested the process on a new server before golive and it was working. I believe the winscp version was 4.2.2. I tested again the week before golive and the sql server jobs started failing.
We are running windows 2008 R2 and sql server 2008 R2. The dtsx file was created in BI2008. It works when running in visual studio now but it failed on two of the uploads last week. I republished to the sql server and it won't run. I just upgraded to winscp 4.3.3 in hopes that that would help , but no go. I have a profile set up in winSCP and saved using the account that sql agent is using to run the job. The FTP server is old and has been used for many years for ftp but I don't have any access to it other than one directory that we upload and download to and from. I am using an Execute Process Task to run the upload/downloads. I tried using a script file but couldn't get it work at all so I am putting the command on the arguments section of the Execute Process task.
Here is the syntax:
/command "option batch on" "option confirm off" "open ""xxx@xxxx.u.washington.edu""" "put ""C:\Database\major.dat"" ""/xxxxxxx/grad/""" "close" "exit"

The error that is generated is always this:
[Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "/command "option batch on" "option confirm off" "open ""xxx@xxxx.u.washington.edu""" "put "C:\Database\uploadapptest1.txt" "/xxxx/grad/"" "close" "exit"" at "", The process exit code was "1" while the expected was "0".

The process is appending "at" to the end and causing it to fail.
I tried saving the profile with a one word name like "work" but that didn't help. Do I need to escape the @ symbol somehow? We are using public/private keys for authorization. The account used to run the job has permissions to windscp folder, and keys in its own folder and was granted admin on the server, but no go.

Any help would be much appreciated as I am having to manually upload and download the files since we are now in production.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I do not think "at" is part of the command, supposing the second double-quote after the exit means end of the parameter string (starting with double-quote before the /command).

I believe that have the double-quotes wrong.
Double the double-quote before and after C:\Database\uploadapptest1.txt and before and after the /xxxx/grad/
So it should be:
/command "option batch on" "option confirm off" "open ""xxx@xxxx.u.washington.edu""" "put ""C:\Database\uploadapptest1.txt"" ""/xxxx/grad/""" "close" "exit"

If it does not help add /log=logfile command-line parameter to enable logging and check the log file. If it still does not help, post the log file here.
sgiltzow
[View user's profile]

Joined: 2011-07-21
Posts: 1
prikryl wrote:
I do not think "at" is part of the command, supposing the second double-quote after the exit means end of the parameter string (starting with double-quote before the /command).

I believe that have the double-quotes wrong.
Double the double-quote before and after C:\Database\uploadapptest1.txt and before and after the /xxxx/grad/
So it should be:
/command "option batch on" "option confirm off" "open ""xxx@xxxx.u.washington.edu""" "put ""C:\Database\uploadapptest1.txt"" ""/xxxx/grad/""" "close" "exit"

If it does not help add /log=logfile command-line parameter to enable logging and check the log file. If it still does not help, post the log file here.


I did find the quote issue and fixed it. I got an upload job and a download job to work when testing it. I replace the process task and recreated it in my Production jobs and they failed with the same issue appending an "at" at the end of the command. You mentioned a /log=logfile addition to the command line. Where should it be placed in the command?
_________________
sbg
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
sgiltzow wrote:
You mentioned a /log=logfile addition to the command line. Where should it be placed in the command?

Put it at the very beginning.
_________________
Martin Prikryl
guest

Guest


I guess the log file was truncated, wasn't it? It was probably too long as there are many sessions in the one log. Can you lookup the session that failed and post only the log for that session? Search for "error".
guest

Guest


guest wrote:
I guess the log file was truncated, wasn't it? It was probably too long as there are many sessions in the one log. Can you lookup the session that failed and post only the log for that session? Search for "error".



I think I finally got this to work. Solution: create .ini file, port packages to new project, change inline command to remove extra double quotes. It has only gone through on cycle so i am keeping my fingers crossed. Smile
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License