dbTalk Databases Forums  

Re: Delete File Access Denied - DTS

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


Discuss Re: Delete File Access Denied - DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Delete File Access Denied - DTS - 09-06-2005 , 05:27 PM






Setting the workflow properties to "Close Connection On Completion" is a
good start. If that isn't working then something must still have hold
of the file. I would use something like Filemon fom sysinternals to see
what grabs the file. I would also try deleting the files outside of the
package as well.

Allan

"Francisco Miranda" <francisco.miranda (AT) gopac (DOT) com.mx> wrote


Quote:
Hi every one, I have a huge problem, we hava a DTS
that make :
1) Get the name of the file to Unzip
2) Unzip dbf files
3) Transform DBF files into SQL Tables
4) Delete the DBF files to ensure that the next zip if isnt have any
dbf
files, we dont transform the prior DBF
These Delete is an ActiveX that delete the file

The problem is that if we run manualy the dts package it works fine, but
when we schedule the package somettimes delete the files and in other we
get
Acces Denid error.

We have put into on the close connectio flag when completition , in all
the
transformations we make, but we reach these error.

Any one have an idea ?

Thanks in advantage.


Reply With Quote
  #2  
Old   
georgejetson
 
Posts: n/a

Default RE: Delete File Access Denied - DTS - 09-07-2005 , 09:02 AM






I've seen this when I've had errors occur in Active X Script task
using the File System Object and I had my error handler simply resume next
Step thru and msgbox out any errors that may occur that you don't see.

You're using the WZip UnZip Command Line Util, right?
Also, how are you unzipping?
Execute Process Task or Active X Script Task? I've had more success with
the latter.

Also, check out ALL the flags that the Command Line Util accepts...one
automatically answers possible questions as 'YES' or 'NO', another closes the
DOS Shell automatically without any prompt...

Are you waiting for WinZip to complete before deleting files?

Hint: I have 2 generic dts packages
a) Zipper (Globals: source, destination, errCode)
b) Unzipper (Globals: source, destination, errCode)

All dts packages call these packages and WAIT for completion before moving
on (ie:deleting files and the like)

ie: Active X Script
pseudo:
for each file in some dir
a) call Unzipper with source destination
b) wait for completion and get errCode
c) next file

Finally, after all our unzipping
Delete the Files (maybe if your looping thru all the Files in a Dir and
deleting them on the fly, the collection is changing...but I'm not sure)
--
later

georgejetson


"Francisco Miranda" wrote:

Quote:

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.