I've been having problems with deadlock on SSIS variables. The main issue is that I have a script item, which has a readwrite variable of strErrorDescription. In the case of a problem this gets populated. I have an onError event tied to this script item. That event uses strErrorDescription to populate the reason for the error. The onError event triggers before the script item finishes properly, and so before the variable gets released. After a bit of headscratching I found this post on the MSDN forums which describes the problem, and a workaround. I've added Dts.Variables.Unlock() to the code, just after the variable is written to, and this seems to do the trick.
comments powered by Disqus