Background
In my recent SSIS deployment into Polybase servers that run on Windows Server 2019, I encountered the error message, “The binary code is not found” when the data pipeline began to execute the first package. Then, the SSIS execution failed.
More information that came with the above error message,
Error at Script Task: The binary code for the script is not found. Please open the script in the designer by clicking the Edit Script button and make sure it builds successfully.
Error at Script Task: There were errors during task validation.
I am using Visual Studio 2015 to build or compile the SSIS packages on my local machine. There is no error during the execution. The same set of SSIS packages was deployed into another server that runs on an older version: either Windows Server 2016 or Windows Server 2012. It has been running normally daily without encountering similar error messages before.
What is this bug?
I searched on Google to find out more. Sometimes this is caused by a compilation error due to a bug in the script. For example, syntax errors, and usually such errors we can spot quite early. This is resolved by simply building the component a reviewing the errors found.
Other times this error is caused by the bugginess of SSIS and there is no good reason why the script fails to precompile. There are no bugs and the script has actually run perfectly in the past.
Another reason that my colleague shared is copying and pasting the script task component from one package to another package or within the same SSIS package would cause some errors.
What did I do in the beginning?
Based on the above error message, I opened the script task component in the SSIS package, and clicked on the “Edit Script”. I hoped that a simple rebuild would help me to fix the above error. However, it did not.
I made a comparison of the SSIS setting between this SSIS solution and another SSIS solution that I deployed into the Polybase server a month ago to find out more ideas to fix it. I noticed that TargetServerVersion was different between these two solutions; one is using 2016 and another is using 2017. My colleague said it did not affect me much even though I deployed to a Polybase server that uses Windows Server 2019. It should be backwards compatible.
Changing TargetServerVersion to 2017
One thing to take note of when changing the target server version is the script task component will remove the existing variables and/or script inside the Script Task. When I tried to do so, it randomly happened to my SSIS packages. So, take note.
Rebuild Script Task and SSIS Solution
Inside the script task, we can rebuild the script after checking through all the syntax, and at the project level, we can rebuild the SSIS solution. Both rebuilds were successful. It means there was no error with my C# scripts and my packages. However, changing the above two items did not help, the SSIS execution failed to run the first package.
So, I searched for more help or ideas from Google and came across this article that suggests to use, Select the Clean option from the Build menu in Script Task. (Refer to the first link below)
Clean option does build, rebuild, or clean all or some of the project items in a solution. Personally, I do not think it helped much especially since the SSIS package has some stubborn errors that cannot be removed by the rebuild or clean option.
Downgrade the server
In some of the articles that I read, they shared that they downgraded the server or Visual Studio 2019 version. It is not a feasible plan for my case because I cannot do that, and I am in the midst of migrating to a newer server.
Other things that people did and did not work
- Changes the delay validation to True.
- Reinstalled Visual Studio.
- Set the PrecompileiIntoBindaryCode to False, and the default is set to true.
Something that I might need to take note of when I upgrade to use Visual Studio 2019. There is a regression in VS 2019 16.9 that will cause the script task/component not to work properly when editing the script.
What worked for me?
Yes, delete the script task and redo it from scratch without copying the same script to another part within the SSIS package or SSIS solution. I re-added the script task and went through the tedious procedure to add the output columns that I used in the script task previously.
References
If you like my review and wish to donate, you may do so via the buymeacoffee’s QR code below:
You must be logged in to post a comment.