0
votes

We have SSIS packages and a SQL Server database. We have to migrate our data and packages to a new database, and our SSIS packages have been troublesome.

The packages are a SQL task -> Data Flow Task -> SQL Task -> Script Task. SSMS is throwing an error on the script task. I do not have permissions to access the server directly and run VS from there. On my local machine, everything runs fine.

We determined that the script task is actually unnecessary in the process, so I deleted that step and re-deployed the packages. However, it's throwing the exact same script task error despite the script task not being there anymore.

If I recreate the package without the script task ever being involved, it runs just fine. I would need to recreate a huge amount of packages, so I'm trying to avoid this at all costs.

Does anybody have any ideas?

1
what is the error message and what version of current sql server they run fine on and version of the new.Tim Mylott
The error message is Claim Error: Failed to compile scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors. Claim: Error The binary code for the script is not found. Please open the scrip in the designer by clicking Edit Script button and make sure it builds successfully. Old SQL Server was 2014 and the new SQL Server is 2017.ashp
version of visual studio? VS2015+? We've found it can usually be related to the TargetServerVersion defined on the project. Right click the project in solution explorer, properties, General under Configuration Properties, option called TargetServerVersion. Change that to 2017 and redeploy.Tim Mylott
VS2013. Unfortunately, I don't see a TargetServerVersion option. Under Configuration Properties there is only Build, Deployment, and Debugging.ashp
It smells like there's a lot going on here and you might be targeting the wrong problem. You migrated packages from 2014 to 2017. The unit of deployment, a .ispac file, should have been upgraded to 2017 as part of the deployment to the new server. The fact that you modified an existing package and redeployed and yet are still having the same error would imply 1) the deployment did not go as expected 2) you are executing a different version of package 3) A different script task is raising the exceptionbillinkc

1 Answers

1
votes

We figured out the solution. In the Package Explorer, I needed to drill down into Executables > Insert Sequence Container Name Here > Event Handlers > OnPreExecute > Executables > Script Task. Delete the script task there and then deploy. Now the script task is gone for good and the package runs successfully.