SSIS Problem while Moving Files After Loading
Hi All,
In my SSIS package I have a for each loop container to loop through files inside a Folder then i have another for each loop container which will loop through Sheet Names and Finally in Data Flow Task am loading data from Sheets to a table.
While Moving files after For each Loop Container Completes using Script task or File System Task it gives me an error saying that
The Process cannot access the file because its being used by another process.
Any help is highly appreciated.
Thanks
June 25th, 2012 5:33am
Hi There
Please have a look on the following thread that might help you
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/3ca0c922-c2d8-4839-9244-070f868d521e
You need to make sure that you need to close the connection inside script task
excelConnection.Close()
excelConnection = Nothing
excelConnection.Close()
excelConnection = Nothing
Many thanks
Syed
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 5:39am
Hi,
It seems your file is locked by another process, please refer to this two posts which may help you:
http://microsoft-ssis.blogspot.jp/2011/05/wait-until-file-is-unlocked.html
http://consultingblogs.emc.com/jamiethomson/archive/2006/10/23/SSIS_3A00_-Put-a-package-to-sleep.aspxPlease vote if it's helpful and mark it as an answer!
June 25th, 2012 5:45am
Besides the script Simon mentioned, there is also a custom task that waits until the file is unlocked:
http://microsoft-ssis.blogspot.nl/2012/01/custom-ssis-component-file-in-use-task.html
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2012 10:10am