I would like to execute WinSCP3.com using a job in MS SQL Server 2005. The goal is to copy files from a different server to the server hosting the SQL server.
The details are:
WinSCP3.com - ver 188.8.131.52 from download of package ver 184.108.40.2060
DB: Job configured in SQL server agent to execute a VB6.exe
vb6.exe: creates a script file depending on certain parameters. It then does ShellExecute using WinSCP3.com /privatekey=keyfile /script=newscriptfile
Problem: The script file appears to be executed but no files are transferred from the destination server.
No errors are reported in the SQL server job history.
I have a log file for the vb6.exe and this captures the command line call for WinSCP3.com and the shell response. The response is 42 (so not an error) and to check the command line call I opened a command prompt on the server and copied across the text from the log file *exactly*. This completes successfully and the appropriate files are copied across from the other server.
Is it a SQL server job configuration issue or is it a WinSCP3 issue. I think the former as when executed at the cmd prompt all is well. Any help would be gratefully received.