The process cannot access the file it is being used by another process.
I have a File System Task Copy file operation to copy a file in an SSIS package. The package when scheduled as a job fails with the following error: The process cannot access the file 'C:\ETL\Consignment\Apple\AppleRawFile.txt' because it is being used by another process.". However when I right click on the package and execute it manually from the Integration Servicesit runs successfully without any problem. I am not certain on how to resolve this issue any inputs will be much appreciated. Thanks, Monisha
August 24th, 2006 7:53pm

I had this problem and it was very silly. when i checked the Task manager the texr file i was trying to access was still hanging out for some reason. Wheni ran the package previouslyit was trying to write into the fileandwas hanging. After i deleted from the task manager. it worked!!!!! Jas
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2006 1:37am

I know for certain that the text file in question was not open / running and I do not see it as an application in the task manager. Also the run package completes sucessfully when run immediately, however this problem with the job persists day after day. Where in it fails with the "The process cannot access the file it is being used by another process" error message. Any further inputs will be appreciated. Thanks.
August 25th, 2006 1:46am

FileMon will tell youwhat is using the file. -Jamie
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2006 8:19am

The job failed again this morning and the error in the log file is as follows: User:OnError,WEB-INTETL,NT AUTHORITY\SYSTEM,Copy to Raw file,{E59D4D04-64D8-475A-8FE0-40B1B9EADE98},{7269CA76-D1A2-4200-BE18-15A75B3076C5},8/25/2006 9:26:36 AM,8/25/2006 9:26:36 AM,-1073548540,0x,An error occurred with the following error message: "The process cannot access the file 'C:\ETL\Consignment\Apple\AppleRawFile.txt' because it is being used by another process.". However when I used FileMon to check if the file is being used by some other process it does not show that the specific file in question is used by some other process. Any further input will be much appreciated. The same job used to run perfectly on another SQL Server 2005 instance, the problem started happening once we moved it to the new SQL Server 2005 box. Again it runs perfectly when executed manually right after it failed as a job. Thanks, Monisha
August 25th, 2006 7:33pm

Hi guys, has someone provided solution for this? I'm also encountering the same error but with a File System task that deletes a file. Thanks. Erwin
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2007 4:44am

erwin732 wrote: Hi guys, has someone provided solution for this? I'm also encountering the same error but with a File System task that deletes a file. Thanks. ErwinLook at the FileMon utility that Jamie posted a link to above. I didn't test the link, but you can search the 'Net for "FileMon" and you'll find it.Some other process is holding on to that file and causing you issues. FileMon will help you determine what that process is.
October 22nd, 2007 4:56am

Thanks Phil. I found the process holding the file.
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2007 7:38am

I'm having an issue with the cannot access file during a File System Task. I'm basically renaming the file to a an archive location after the source file is finished beign processed. I use the renameoperation of the Fiel System Task to accomplish this move. I'm renaming the file by adding the date the file was processed to the filename.I'm usingvariable for the source and destination directories.It had all been working fine until "Something" changed. I'm using Filemon and it indicates the file I'm trying to rename is Not Found. The path displayed in filemon is the correct path to write the file to. any suggestions? Phil K
December 14th, 2007 2:13am

Tryusing FileMon to check the file you are copying from - that's the one that is locked.
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2007 2:50am

Yes, I used filemon and the file is being used by the dtsDebugHost process but it's not releasing the file after the data flow completes. I changed the File System Task to a Script task and used the VB Filesystem methods to move the file around and it fails but not always. It reports "the process cannot access the file because it is being used by another process". For some reason I can't determine, the prior data flow task is not releasing the filefor everyiteration of the files inin the For Each loop. The same behavior occurs for File system Task and a Script taskattempting the sameoperation.The files being accessed are Excel Files. Is there a difference access method to the files available?
December 15th, 2007 2:25am

Based on the lack of response, I guess this must be a stumper and needs to be addressed with Microsoft support.
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2007 10:57pm

pkdenver wrote: Based on the lack of response, I guess this must be a stumper and needs to be addressed with Microsoft support. I'd attribute the lack of a response to the fact that two replies earlier in the thread have already been marked as answers. There are enough posts in this forum that I (and I assume that other folks who answer questions here may do something similar) generally filter to only view unanswered questions,primarily so I can focus on helping people who ask for it. Posting a new question to an already "closed" thread can make it invisible unless people are actively looking at already answered posts. (With that said, I personally have no idea what could be causing the problem )
December 17th, 2007 11:30pm

Okay.. makes sense. I thought I was being efficientby not creating a new thread to a previous topic. Thanks for the response.
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2007 11:33pm

pkdenver wrote: Okay.. makes sense. I thought I was being efficientby not creating a new thread to a previous topic. Thanks for the response. No worries! It could very well be that it's me that is using the forums incorrectly and "hiding" valid questions from myself. With that said, one thing that I see done commonly is people posting new threads for their problems with links to previous threads that have similar or related problems to bring in the context of the existing thread while still having a dedicated thread in which to track their own unique issues.
December 17th, 2007 11:39pm

Hi Jamie,Filemon is replaced by Procmon.I am able to see which processusing my file(eg:explorer.exe). How can I kill that reading process? I did not find any option relavent to kill the process when I right click on that file in procmon. Could you help me to resolve this.Thanks.
Free Windows Admin Tool Kit Click here and download it now
July 10th, 2009 5:48pm

I find the process(explorer.exe) whats reading my file. How can I kill it using procmon.Thanks.
July 10th, 2009 5:54pm

Hello Solution was to go to task manager and delete the program responsible for using the resource, for me the site was not willing to start in IIS, program was dsdomain. Smiles Momo
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 11:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics