Topic "Trouble shooting other MS SQL job Executed as user: HSEN\_"

Author Message


I am receiving the following messages

Executed as user:HSEN\_sossqlservice. C:\Program Files\Common Files\SYSTEM\MSMAPI\1033>c:\program files\winscp\ /script=c:\batch\FTPKTToKAText.txt /log=c:\batch\ftptocontroltec batch on confirm off Searching for host Host does not exist No Session. c:\ImportExport\KinderTrack transfer binary No session. No session. No session. c:\ImportExport\KinderTrack\Tracking transfer binary No session. No session. No session. No session. c:\ImportExport\KinderTrack\Schedules transfer binary No session No session Process Exit Code 1. The step failed

We have a MS SQL 2000 job that is calling to the batch. The batch then runs the ftp file. The job is failing at step one.

We have the following environment

1. WinSCP ver 4.1.9 build 416
2. MS SQL 2000
3. Windows Server 2003 r2 sp2 standard edition
4. Using SFTP
5. Using scripting/automation
6. Connecting to GlobalScapes EFT server

7. The command in the batch is
"c:\program files\winscp\" /script=c:\batch\FTPKTToKTText.txt /log=c:\batch\ftptocontroltec

option batch on
option confirm off
open Controltec
cd KinderAttend
lcd c:\ImportExport\KinderTrack
option transfer binary
Put KinderCN.txt
Put KinderPN.txt
cd ..
cd KinderAttend\Tracking
lcd c:\ImportExport\KinderTrack\Tracking
option transfer binary
Put TrackingAttendance.txt
Put TrackingChildProviderExport.txt
cd ..
cd ..
cd KinderAttend\Schedules
lcd c:\ImportExport\KinderTrack\Schedules
option transfer binary
Put KTtoKAChildScheduleExport.txt

Solution we tried
1. gave everyone full rights to the folder that contains the batch files
2. gave everyone full rights to the folder for WinSCP

What currently works is

Microsoft ftp client on the server. MS SQL 2000s job call to the batch and the batch runs the ftp commands using Microsofts ftp client.

The client is requesting to use SFTP to submit data.

Thank you for any assistance,

When I double click on the batch WinSCP works. Its only when we start using a MS SQL's job we encounter problems.

1. We changed the storage to INI
2. Located the INI in the WinSCP directory
3. Gave the SQL agent permission to the WinSCP folder.

This allowed the MS SQL job to call out to the batch.

It appears the account used to install WinSCP was not the same account that runs the MS SQL agent.

Yeah! working. Thank you for the information
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
For others: please read FAQ.
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License