Wednesday, September 26, 2007

FUN with SSIS Script Tasks and 64bit deployment

I am developing my SSIS packages on my 32 bit, Windows XP Pro SP2 laptop. Everything works fine. My project has a parent package and 26 child packages.

In the child packages, I have a script task that sets the version number into a variable. Nothing big, 1 statement:

Dts.Variables.Item("User::Version").Value = Dts.Variables.Item("System::VersionMajor").Value.ToString() & _
"." & Dts.Variables.Item("System::VersionMinor").Value.ToString() & _
"." & Dts.Variables.Item("System::VersionBuild").Value.ToString()

So I created a "template" package that had my basic tasks in it, and started each child package from this template.

Everything worked great on my laptop.

Deployed to our 64-bit production platform and I get the following error when running the package:
Precompiled script failed to load. The computer that is running the Script Task does not have a compiler capable of recompiling the script. To recompile the script, see the Microsoft Knowledge Base article, KB931846 (http://go.microsoft.com/fwlink/?LinkId=81885).
Naturally I follow the link in the error, after cleaning up the water that I spewed from the surprise I got from a very detailed error message in SSIS.

It did not apply to me... I had SQL Server SP2 installed. I even re-installed after reading it, just to make sure. Did not fix it.

Found this forum thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=591709&SiteID=1

Read thru it... Had NO script tasks set to False for pre-compile.

After looking thru my packages, confirming Precompile was set to True, I had an epiphany...

Since I started from a template, I bet the script tasks were NOT being compiled, since I never opened them.

So I went thru all 27 packages, opening up each script task (Control Flow) AND component (Data Flow), and then the script window. Closed the script window, and pressed ok on the script task window.

Re-built and deployed... tested OK!

So, if you use a "template" package with a script task or component, make sure you open the actual script screen and close it again to force a re-compile.

BobP

10 comments:

Anonymous said...

did you opend the package scripts in the 64 bit then redeploy?

Anonymous said...

I did exactly same thing... still getting the error !!

Andrew said...

You can also set Run64BitRuntime = false in the project properties, or run x86 dtexec version.

Petr said...

Thank you - helped a lot. I had the same problem. Although I developed the SSIS package on a Vista x64 machine. I had to open and close each script task and its script window.
The error is surely connected with script task copy&pasting.

Rohit Gholap said...

My script task does not hav property as precompile.
Where should i get this property?

Unknown said...

Rohit

Double-click on your Script Task.

Then go to the Script Option on the left - you should then see the PrecompileScriptIntoBinaryCode on the right.

If you then want to edit the code, click on the Design Script button at the foot of the window.

Anonymous said...

Hey,

Just wanted to say thanks for the post. I'm sure what would have taken me hours/days to figure out was reduced to minutes because of your post. Very well done.

Anonymous said...

Thanks! this helped me out.

Anonymous said...

Just tried your solution.

Worked a treat!

Thank you

Anonymous said...

Thank you! Worked a treat