Tim Almond
Tim Almond

Reputation: 12686

File In Use error in SSIS

I currently have an SSIS package which runs a foreach loop around a folder and stores rows from in a number of Excel worksheets into a database. This works just fine.

Outside the loop, I then have a foreach loop which follows to move the processed files into another folder. When it reaches this point, I get an error of

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

I've tried putting in a 10 second delay step, but that still isn't helping. Is there any way around this?

Upvotes: 2

Views: 8985

Answers (2)

Joost
Joost

Reputation: 1913

Sometimes the lock hasn't been released. You could try something like this: http://microsoft-ssis.blogspot.com/2012/01/custom-ssis-component-file-in-use-task.html

Upvotes: 1

Sam
Sam

Reputation: 7678

Doesn't seem like you should have to do this, but you can adjust the maximum concurrent executables and threads. May help, but will also reduce performance.

http://blogs.msdn.com/b/sqlperf/archive/2007/05/11/implement-parallel-execution-in-ssis.aspx

Upvotes: 0

Related Questions