dbTalk Databases Forums  

File System Task - Won't delete file

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss File System Task - Won't delete file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff Reese
 
Posts: n/a

Default File System Task - Won't delete file - 10-19-2006 , 11:30 PM






I have a File System Task step in my DTS. It is supposed to delete an Excel
file from my C drive. When I run the DTS in BI Dev Studio it works fine.
However, when I try to run it using SQL Server Agent, the file isn't deleted.

Any ideas of what could cause this behavior?

Thanks.
--
Jeff

Reply With Quote
  #2  
Old   
Roy Harvey
 
Posts: n/a

Default Re: File System Task - Won't delete file - 10-19-2006 , 11:46 PM






On Thu, 19 Oct 2006 21:30:02 -0700, Jeff Reese
<JeffReese (AT) discussions (DOT) microsoft.com> wrote:

Quote:
I have a File System Task step in my DTS. It is supposed to delete an Excel
file from my C drive. When I run the DTS in BI Dev Studio it works fine.
However, when I try to run it using SQL Server Agent, the file isn't deleted.

Any ideas of what could cause this behavior?

Thanks.
The two obvious issues that could be coming up are the location of the
file in relation to the execution, and having the rights to act on the
file.

When the DTS task runs in Dev Studio I presume it is running on your
own machine. If the SQL Server Agent is running on your own machine
too? If it is running on the server it will not see your C drive, at
least not the same way.

When SQL Server Agent runs it, it runs under a different account
context than when you run it in Dev Studio. That account needs the
rights to deal with the file. Perhaps not relevant in this case, if
the file is reached across the network it needs to reference it using
a UNC path: \\servername\sharename rather than using a mapped drive
letter.

Roy


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.