Search code examples
sql-serverssisdtexec

SSIS Script Task not working when called through dtexec


I am Currently using the visual studio 2015 in which my script task runs fine. When i tried to run the same package using DTEXEC util using the command

C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe"  /f "filepath" 

I am getting an error

The Script Task "ST_7432393ecf7a4af3906ba19425aeb245" uses version 14.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services. at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events) "

Note :

 My SSDT Version is 14.061021.0
 Sql server version 2016
 Visual studio version 2015

Solution

  • "C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /f "filepath"

    The 120 refers to SQL Server 2014 while script version 14.0 is meant for SQL Server 2016. Your SSIS is probably build with the wrong TargetServerVersion. Check the properties of your project and change it to the correct version.

    enter image description here

    EDIT: Or if you're using SQL Server 2016 then you need to change the path to the correct version DTExec.exe. If you installed it in the default path then changing 120 to 130 should work.