Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS - The process cannot access the file because it is being used by another process

I have following Dataflow:

enter image description here

Control:

enter image description here

I just wanted to copy all the data from flatfiles in sourcefolder to sql database and after copying move those files to folder named Done.

But when i run this, i get error:

[File System Task] Error: An error occurred with the following error message: "The process cannot access the file because it is being used by another process.".

Data gets copied to sqlserver , but file does not moves.

My process tab is as follows:

enter image description here

like image 384
C Sharper Avatar asked Dec 18 '13 13:12

C Sharper


People also ask

Is the process Cannot access the file because another process?

This can happen if the file referenced is open in another program or if a crash occurs while uploading. To resolve it, first make sure that no users have the file open anywhere, then reboot the machine to make sure it is not open as a remnant from a crash.

What is Ispac file in SSIS?

Whenever we build an SSIS project, the output of the build is an ISPAC file, also known as the Integration Services Package file. You can easily find this file by browsing the bin directory of the SSIS solution.

What is DtsDebugHost EXE?

DtsDebugHost.exe is the execution host used by Business Intelligence Development Studio (BIDS) / Visual Studio when executing a package from the designer in debug mode, which is the default behaviour.


2 Answers

If the messages cites your ".ispac" file, you have an unclosed debug. Enter Task Manager and close the Debug Host.

like image 188
GeorgiG Avatar answered Sep 20 '22 08:09

GeorgiG


I found this link by accident and posting this to help others that get here as well.

When using a Script task make sure you drop connection with Close() or use connection inside a USING().

The connection is held after the task is complete and until the whole package is complete unless you do either of the above.

like image 34
KeithL Avatar answered Sep 19 '22 08:09

KeithL