SSIS - 该进程无法访问该文件,因为它正被另一个进程使用 [英] SSIS - The process cannot access the file because it is being used by another process

查看:48
本文介绍了SSIS - 该进程无法访问该文件,因为它正被另一个进程使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下数据流:

控制:

我只想将 sourcefolder 中的 flatfiles 中的所有数据复制到 sql 数据库,然后将这些文件复制到名为 Done 的文件夹中.

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆