I spent some time resolving an interesting error today in an SSIS component I was writing that included a Script Component.
The first thing this highlighted was something I was unaware of: You cannot debug using breakpoints within a SSIS Script component.
See here for more details:
So once I had this sorted, I moved on to try to work out what was causing the following error:
I had a script component that was trying to populate a string variable with the list of lines which had errored on an attempted insert into a table. The contents of the script component were pretty unexciting:
A bit of research on the error code 0xC001404D indicated that the variable is being locked somewhere along the way - and so gets caught in a deadlock. http://wiki.sqlis.com/default.aspx/SQLISWiki/0xC001404D.html
I thought this was quite strange as I dont use this variable anywhere else in this package so there wasnt anywhere else that it could be getting locked for read or write.
I eventually realised that the only other place I had added the variable was to to the ReadWriteVariables list in the properties of the Script Component:
As soon as I removed this variable name from that field, I was able to get my script component to successfully run.
This made me think that the field on the properties page must be performing the
Me.VariableDispenser.LockOneForWrite("VariableName", vars)
and corresponding
vars.Unlock()
commands for you automatically so you can just read/write from the variable, yet re-adding the variable to that field & then removing these lines from the code returned the same error.
So it turns out that removing the variable name from the ReadWriteVariables field is the only way to allow you to write to it from within the script component code.
Friday, 14 March 2008
SSIS Script Component Error with PostExecute: 0xC001404D
Subscribe to:
Post Comments (Atom)




1 comments:
I was stuck with problem since morning and due to Your contribution I finally able to fix it.
Thanks
Post a Comment