SSIS - 因为它正由另一个进程的方法,不能访问该文件 [英] SSIS - The process cannot access the file because it is being used by another process
问题描述
我有以下数据流:
控制:
我只是想从flatfiles所有的数据复制sourcefolder到SQL数据库和复制后,将这些文件移动到文件夹命名完成。
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.".
数据被复制到SQLSERVER,但文件不会移动。
Data gets copied to sqlserver , but file does not moves.
我的过程标签如下:
推荐答案
这可能是太明显了,但你有没有试过插入一个短暂的延迟让数据流的时间放手的文件?例如,插入一个执行SQL任务中包含的内容:
This may be too obvious, but have you tried inserting a short delay to give the dataflow time to let go of the file? For example, insert an Execute SQL Task with contents like:
-- Wait for 1 second
WAITFOR DELAY '00:00:01'
另外,你可以处理失败的路径,然后重试,也许后一个延迟。
Alternatively, you could handle the Failure Path and retry, perhaps after a delay.
这篇关于SSIS - 因为它正由另一个进程的方法,不能访问该文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!