Question

Locked

FTP using VBS script failed to copy files when executed as SQL 2000 job...

By fqies_bry ·
...but succeed when run manually at command prompt..

We have a vbs script that access 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? I am not sure why it is not working when executed as SQL job but OK when executed manually.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

It will be permissions of the account

by Tony Hopkinson In reply to FTP using VBS script fail ...

that xp_cmdshell is running under at a guess.

if you are doing it out of SQL Agent in teh scheduler, then it will be the permisions of the account the agent sevice is ruuning at.

Collapse -

executed as agent account

by fqies_bry In reply to It will be permissions of ...

I also executed the vbs script in CMD using the agent account,(which is supposedly the same as what the scheduled job do) and the files are ftped successfully. the ftp is not working properly only when scheduled. any thought?

Collapse -

Unfortunately not

by Tony Hopkinson In reply to executed as agent account

Is there evidence that the script is executing at all from the scheduler.
Moving a file, writing a log or somesuch?

Collapse -

RE:

by fqies_bry In reply to Unfortunately not

Yes.. the vbs has it's own logging mechanism like writing lines in a text file and all those are working... only the file is not ftped from the ftp site to a folder where the it should be dumped.

Back to Networks Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums