我有一个包裹Foreach容器 and 执行流程任务 inside 对于每个容器。在执行流程任务中出现一些错误时,它会重定向到OnError事件处理程序对于每个容器.
我正在使用 .exe 捕获错误标准误差变量任务的属性并在脚本任务中使用它OnError事件处理程序。
脚本任务失败说
错误:尝试锁定变量时检测到死锁
“用户::ErrorExcelName、用户::ErrorFolder、用户::ErrorMessage、
User::FileName”用于读取访问。16 后无法获取锁
尝试并超时。
如何解决这个问题?
您可以通过在代码中显式管理变量锁定来轻松解决该问题。 (不添加变量ReadOnlyVariables
and ReadWriteVariables
特性。
string strFilename;
Variables lockedVariables = null;
Dts.VariableDispenser.LockOneForRead("FileName", ref lockedVariables);
strFilename = lockedVariables["FileName"].Value;
lockedVariables.Unlock();
参考
- http://www.sqlis.com/sqlis/post/A-deadlock-was-Detected-while-trying-to-lock-variables-in-SSIS.aspx http://www.sqlis.com/sqlis/post/A-deadlock-was-detected-while-trying-to-lock-variables-in-SSIS.aspx
- http://sqlblogcasts.com/blogs/mohitnayyar/archive/2007/09/23/update-ssis-deadlock-was-Detected-while-trying-to-lock-variables-mohit-nayyar.aspx http://sqlblogcasts.com/blogs/mohitnayyar/archive/2007/09/23/update-ssis-deadlock-was-detected-while-trying-to-lock-variables-mohit-nayyar.aspx
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)