As I mentioned in a post yesterday (or the day before… it’s been a long week already) I’ve been spending a lot of time lately in the Script Task in SSIS. Well, I have the task logic implemented and tested, so now it’s time to copy that task into all of the packages that need it. So I now have 20 or so packages with the same script in their OnPreExecute event handler, and everything runs great.
Until you look at the package output. During testing I generally pipe DTEXEC’s standard output to a text file and use that as my “to do list”, and with these updated packages I have a 1500+ line file filled with this warning, over and over:
Warning: 2007-11-14 13:53:07.67
Source: Script Task Name Here
Description: Precompiled script failed to load. Attempting to recompile.
For more information, see the Microsoft Knowledge Base article, KB931846 (http://go.microsoft.com/fwlink/?LinkId=81885).
Not a bad warning, all things considered, and it even has a URL – cool!
Of course, the information in the KB article in question doesn’t apply to my scenario, as I’m on a 32-bit machine and am fully patched with SP2 + hotfixes. Hmmm… Time to do some searching…
Well, I’m not alone: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2030858&SiteID=17
And people have been having this problem with Script tasks in packages created from template packages: http://bobp1339.blogspot.com/2007_09_01_archive.html
I copied and pasted each of these script tasks from the package in which I performed the initial development and testing. Not quite a template package in this case, but it’s close. So…
For Each Package in AffectedProjects.Packages
The good news: it works! The warnings are gone!
The bad news: that was MScript – the Matthew Script Language, which performs horribly and does not scale, because it relies on my poor typing skills.
Maybe some time I’ll find time to figure out how to automate this in the SSIS .NET API and add it to PacMan. Maybe some time I’ll find time to sleep too…
 Yes, I know about how custom SSIS components have a much better reuse story, but for now it’s more important for me to keep my deployment as simple as possible, but thank you for caring.