-1

Hi I have doubt in ssis using winscp commands on excuteprocess task

I need download/move .zip file from remote server to local server machine. Here I follow few steps:

step1:I install   winscp software in local server .
step2: I configure winscp settings with hostnameand username and pwd it working fine.

step3: I tried to implement ssis package using executeprocess task
there I given like below seetings in execute process task
executable:
C:\Program Files (x86)\WinSCP\WinSCP.exe

Arguments:
WinSCP /command "open ""sftp://uesrname:pwdhostname""" "get ""remoterservrpath"" localpath" "exit"

after that I ran execute process task.then file is moved from remoteserver to localserver path location then imedentaily package failed with below error message

[Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "WinSCP /command "open ""
sftp://usernamepwdhostname""" "get ""test.zip""
 C:\Users\test\Desktop\Test\test.zip" "exit"" at "", 
The process exit code was "1" while the expected was "0".

here usernamepwdhostname I did not share orignal.I mention similay format. zip file is moved from remote to local server location.its fine.but I am getting package error after move the .zip file

please tell me how to avoid this error in ssis package level

balu kum
  • 1
  • 2
  • You should run the WinSCP command directly in a command window and see if any useful error messages come up, and then resolve them – Nick.Mc Dec 09 '15 at 11:09
  • in the command window does not show any error.there working fine.in ssis package level aslo file is download after that package fail to given above error information. – balu kum Dec 09 '15 at 11:33
  • I suggest you post the output of the command window in the question so anyone else can see it. – Nick.Mc Dec 09 '15 at 11:56

1 Answers1

1

In the arguments field, remove the WinSCP part at the start

executable:

C:\Program Files (x86)\WinSCP\WinSCP.exe

Arguments:

/command "open ""sftp://uesrname:pwdhostname""" "get ""remoterservrpath"" localpath" "exit"

Nick.Mc
  • 18,304
  • 6
  • 61
  • 91
  • Hi when I ran above arguments and executable commands on BIDS environment its working fine.same package I create job schedule using sql server agent job. there its failing with same error [Execute Process Task] Error: In Executing "C:\Program Files (x86)\WinSCP\WinSCP.exe" "WinSCP /command "open "" sftp://usernamepwdhostname""" "get ""test.zip"" C:\Users\test\Desktop\Test\test.zip" "exit"" at "", The process exit code was "1" while the expected was "0". can you please tell how to avoid this situation in sql server agent envirnoment. – balu kum Dec 16 '15 at 02:43
  • You command line is still incorrect. You still have the redundant _WinSCP_ in the arguments. Maybe you didn't deploy your package. – Nick.Mc Dec 16 '15 at 03:01
  • No as per given command syntax only I followed and its working fine in BIDS level then I deploy same package in server there I Scheduled package and run it but its given same error message in agent job.teps: in the steps table: i given step: test steptype:sql server integration package server:test Package: testpackage select 32 bit runtime please tell me how to avoid this error in sql server agent job – balu kum Dec 16 '15 at 03:37
  • Sorry I can't help it really seems like it hasn't been deployed because it's showing an error identical to the one that you were getting in BIDS _before_ you fixed it. It's like it's running a package with the old error in it still. Perhaps double check your deployment. Can you use this link to confirm the package deployment date and version matches your BIDS version: https://social.msdn.microsoft.com/Forums/en-US/0a897b98-5de1-4f62-af8b-6f56cf765d7d/in-ssisdb-catalog-is-it-possible-to-look-at-package-version-build-number?forum=sqlintegrationservices – Nick.Mc Dec 16 '15 at 03:51