While trying to run one of our SSIS Packages from SQL Server Job, which had script component in it, we got the below error. It was running fine within the SSDT in our Dev Machine. In fact, the other packages deployed to SSISDB were also running fine, the ones which were not using the Script Component.
To fix it, we updated the project version of SSDT to match the SQL Server where we were deploying the package inside Project Properties.
To find the SQL Server version.
only that package instead of the project in SSISDB.
However, on running the package from within the SQL Server again, threw the same error. We tried a few other things like opening the same package in SSDT in the Server and then try deploying that particular package from there. We also tried by deleting the existing the script component in the package and using the script component that was available in the toolbox in SSDT in the Server.
The package clearly showed the difference in the version for the Script Component. However again deploying that single updated package gave the same mismatch exception.
Eventually, we then deployed the Project (after updating the Target SQL Server version to the Server’s SQL version) and not the individual package. And it ran successfully this time.
So basically we need to make sure our target version is correct and deploy the entire Project to fix this issue in our case.
Hope it helps..