If I set pre-compile script into binary code to true I get error saying "The task is configured to pre-compile the script, but binary code is not found." If I set this property to False then it works. Will it be a problem after I deploy package on production server? Please advice.
+1
A:
The binary code would need to be pre-compiled if you are running production in 64-bit, is this the case? Sounds like there is a syntax error in your script code though, can you post it here so we can see what the problem might be?
revelator
2010-03-18 13:29:38
Also, this MS Support article may be of use...http://support.microsoft.com/default.aspx/kb/932557?p=1
revelator
2010-03-18 13:32:02
Thanks. I'm not sure about production server I'll check that.Here is my scriptImports SystemImports System.DataImports System.MathImports Microsoft.SqlServer.Dts.RuntimeImports System.IOPublic Class ScriptMain Public Sub Main() If File.Exists(CStr(Dts.Variables("strFileLocation").Value)) Then Dts.TaskResult = Dts.Results.Success Else Dts.TaskResult = Dts.Results.Failure End If End SubEnd Class
Pramodtech
2010-03-18 13:52:53
That script runs fine in my package (on SQL 2005). I think the support article fix might be your best bet.
revelator
2010-03-18 14:10:40
I think so. By the way I don't think so it will happen in near future and I am thinking of alternative. Instead of file check I'll directly try to read the file and if file is not there it will thro w error and on this event I can send an email. But this has limitaion how I can find the error is because of source file? Is there any way in OnError event handler to identify error code and then send email?
Pramodtech
2010-03-18 14:22:33
A:
You shouldn't have any problem if you don't have to deploy to a 64-bit machine. From MSDN:
If the script is precompiled it will start more quickly and the script can run in a 64-bit environment. However, the package size is larger when it contains precompiled scripts. Moreover, compiled script cannot be debugged
This a problem acknowledged by Microsoft (in Sql Server 2005), and you can find a fix here
santiiiii
2010-03-18 13:35:24