dbTalk Databases Forums  

Unable to delete Access File after processing

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


Discuss Unable to delete Access File after processing in the microsoft.public.sqlserver.dts forum.



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

Default Unable to delete Access File after processing - 07-16-2003 , 10:18 AM






I get an access denied error when I attempt to delete and
access database file after importing it using DTS. It
appears that DTS holds on to the file until the package
completes.
Here is what I am doing. The file in question is an
Access.mdb file

If file NewFile exists rename to ProcessFile.
import the data from processfile and process it.
Delete processfile.

The delete step fails with access denied. I added a wait
before the delete and it still never released the file.
Watching the process in the browser, the .ldb file does
not appear to get removed until after the package
completes.

What is the best way around this? Spawn a new package to
do the delete or is there a way to force DTS to release
the file.

Ken


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Unable to delete Access File after processing - 07-16-2003 , 10:43 AM






I have seen this before. Yes even though you may set "Close Connection on
completion" then DTS keeps a hook to the DB.
I have got around this by adding a job step that deletes the file after the
DTS package has run.
--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Ken" <ken.terrell (AT) masco-csc (DOT) com> wrote

Quote:
I get an access denied error when I attempt to delete and
access database file after importing it using DTS. It
appears that DTS holds on to the file until the package
completes.
Here is what I am doing. The file in question is an
Access.mdb file

If file NewFile exists rename to ProcessFile.
import the data from processfile and process it.
Delete processfile.

The delete step fails with access denied. I added a wait
before the delete and it still never released the file.
Watching the process in the browser, the .ldb file does
not appear to get removed until after the package
completes.

What is the best way around this? Spawn a new package to
do the delete or is there a way to force DTS to release
the file.

Ken




Reply With Quote
  #3  
Old   
Ken
 
Posts: n/a

Default Re: Unable to delete Access File after processing - 07-16-2003 , 11:08 AM



Thanks,
Actually I had not set the flag "Close connection on
completion" on the transform data task(Under workflow
properties) tasks. I found that after I posted this and it
seems to be working. The delete step is a seperate
vbscript task that runs last.

If this starts to give me problems, I will have to do as
you suggest and just add a SQL job step to perform the
delete after the SQL job step that runs the package
completes.

Ken
Quote:
-----Original Message-----
I have seen this before. Yes even though you may
set "Close Connection on
completion" then DTS keeps a hook to the DB.
I have got around this by adding a job step that deletes
the file after the
DTS package has run.
--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Ken" <ken.terrell (AT) masco-csc (DOT) com> wrote in message
news:0c8b01c34bad$86f4c740$a401280a (AT) phx (DOT) gbl...
I get an access denied error when I attempt to delete
and
access database file after importing it using DTS. It
appears that DTS holds on to the file until the package
completes.
Here is what I am doing. The file in question is an
Access.mdb file

If file NewFile exists rename to ProcessFile.
import the data from processfile and process it.
Delete processfile.

The delete step fails with access denied. I added a wait
before the delete and it still never released the file.
Watching the process in the browser, the .ldb file does
not appear to get removed until after the package
completes.

What is the best way around this? Spawn a new package to
do the delete or is there a way to force DTS to release
the file.

Ken



.


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Unable to delete Access File after processing - 07-16-2003 , 12:44 PM



When I have seen it the problem was with a text file and even setting this
workflow property couldn't disconnect it properly. Glad you sorted it
though

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Ken" <Ken.terrell (AT) masco-csc (DOT) com> wrote

Quote:
Thanks,
Actually I had not set the flag "Close connection on
completion" on the transform data task(Under workflow
properties) tasks. I found that after I posted this and it
seems to be working. The delete step is a seperate
vbscript task that runs last.

If this starts to give me problems, I will have to do as
you suggest and just add a SQL job step to perform the
delete after the SQL job step that runs the package
completes.

Ken
-----Original Message-----
I have seen this before. Yes even though you may
set "Close Connection on
completion" then DTS keeps a hook to the DB.
I have got around this by adding a job step that deletes
the file after the
DTS package has run.
--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Ken" <ken.terrell (AT) masco-csc (DOT) com> wrote in message
news:0c8b01c34bad$86f4c740$a401280a (AT) phx (DOT) gbl...
I get an access denied error when I attempt to delete
and
access database file after importing it using DTS. It
appears that DTS holds on to the file until the package
completes.
Here is what I am doing. The file in question is an
Access.mdb file

If file NewFile exists rename to ProcessFile.
import the data from processfile and process it.
Delete processfile.

The delete step fails with access denied. I added a wait
before the delete and it still never released the file.
Watching the process in the browser, the .ldb file does
not appear to get removed until after the package
completes.

What is the best way around this? Spawn a new package to
do the delete or is there a way to force DTS to release
the file.

Ken



.




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.