FTP using VBS script failed to copy files when run as SQL job

  • Hi,

    We have a vbs script that acceee an ftp sites and ftp some files. This vbs script is executed using SQL job via xp_cmdshell and cscript. After we upgrade the server from Win server 2000 to 2003, the job execute the vbs but no file is being ftped to the server. but when executed manually using cmd prompt and cscript, the files are being copied.

    any thoughts will be appreciated. Let me know if you need more info.

    these are the object being used in FTP:

    ' Create objects

    Set wsh = CreateObject("Wscript.Shell")

    Set fs = CreateObject("Scripting.FileSystemObject")

    is there any incompatibility on these objects to win Server 2003?

    :-):cool:

  • Is there a known issue on scheduling SQL job in SQL 2000 in Windows server 2003? I tried to use bat file to execute the vbs script as CmdExec instead of TSQL via xp_cmdshell but still the ftp is not working. By the way, it can access the ftp but not able to copy. I tried executing the vbs in the cmd schell using the service acount to check if there are permission problem in agent's account but the ftp is successful. only when scheduled as SQL job, the ftp is not working. Any thought is very appreciated.

    :-):cool:

  • Curious, I have the same issue here. Any feedback or solution on this?

  • Does the account that Server Agent is running under have appropriate privileges on the file?

  • Hi guys, we just put the job to WIndows scheduler instead of the SQL agent. the job is OK. I am no linger with that project but thats the work around we did. Thanks.

    :-):cool:

  • The solution for me was embarassingly simple. The proxy account had also been provided as the service account for the agent. The proxy account in not an administrative account on the server. We have another account for that purpose. Once I made these changes the problem went away.

    Later

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply