|
Home > Archive > MS SQL Server DTS > July 2005 > can't delete file from a job but succeeds from the dts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
can't delete file from a job but succeeds from the dts
|
|
| ia.zohar@gmail.com 2005-07-25, 11:25 am |
| Hi,
I have a problem that I don't understand.
I am trying to do a simple thing:
Dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
filesys.DeleteFile("v:\skarimTest.xls")
from an activex inside a dts.
The v:\ drive is mapped via "net use" to a directory on a different
server (I also tried the \\serverName\<directory> ).
If I run the DTS directly everything works fine (if I run the DTS from
my client or directly from the server), but from a job scheduled to run
the DTS it always fail.
The sqlServerAgent that runs the jobs is run by the Administrator user.
What can be the problem?
I'll be very happy for any suggestion because I've tried so many
solutions and nothing seemed to work.
Thanks a lot,
Adi.
| |
|
| Hi
I use 'xp_cmdshell', it works fine for me. Try it !!
(xp_cmdshell can run any dos commands, you have to specify 'del
\\server\filename' , this should take care of it.
Panch
| |
| Allan Mitchell 2005-07-25, 8:29 pm |
| Chances are that the Administrator account has no idea about the v drive.
Can you use UNC paths?
also look here
http://support.microsoft.com/?kbid=269074
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
<ia.zohar@gmail.com> wrote in message
news:1122305277.392916.48680@g49g2000cwa.googlegroups.com...
> Hi,
> I have a problem that I don't understand.
> I am trying to do a simple thing:
>
> Dim filesys
> Set filesys = CreateObject("Scripting.FileSystemObject")
> filesys.DeleteFile("v:\skarimTest.xls")
>
> from an activex inside a dts.
> The v:\ drive is mapped via "net use" to a directory on a different
> server (I also tried the \\serverName\<directory> ).
>
> If I run the DTS directly everything works fine (if I run the DTS from
> my client or directly from the server), but from a job scheduled to run
> the DTS it always fail.
> The sqlServerAgent that runs the jobs is run by the Administrator user.
>
> What can be the problem?
> I'll be very happy for any suggestion because I've tried so many
> solutions and nothing seemed to work.
>
> Thanks a lot,
> Adi.
>
|
|
|
|
|