SQL Server Integration Services (SSIS) – There Was an Exception While Loading Script Task from XML

SQL
2 Comments

SQL Server Integration Services (SSIS) - There Was an Exception While Loading Script Task from XML errorspy Recently one of my old clients contacted me for an error execution via SQL Agent Job. They informed that it runs fine when they invoke the package from Visual Studio (SSDT). In this blog post, we will discuss Exception While Loading Script Task from XML.

Here is the error which was seen in SSISDB reports via management studio.

Script Task 1:Error: There was an exception while loading Script Task from XML: System.Exception: The Script Task “ST_24802bd6f41940e0befad660c2cba337” uses version 15.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)

The error message is good enough in telling the cause. The script task version is 15.0 and SQL SSIS version is not compatible. Our target version was SQL Server 2016.

WORKAROUND/SOLUTION

When I checked various version, I found that the SSIS package was developed with Azure features packs on SSDT 2017. Since we are deploying it in SQL server 2016 and running via agent job, it is throwing an error.

To fix the problem, all we needed to do was change the TargetServerVersion values under project properties as shown below.

SQL Server Integration Services (SSIS) - There Was an Exception While Loading Script Task from XML ssis-target-01

Have you encountered a similar error? Please comment and let me know if you found some other solution?

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , , ,
Previous Post
SSMS – Azure Storage Error – A Connection Attempt Failed Because the Connected Party did not Properly Respond After a Period of Time
Next Post
SQL SERVER – SQL Clustered Resource in Online Pending State for Long Time Before Coming Online

Related Posts

2 Comments. Leave new

  • Hi Pinal, thanks for all the solutions you posting on your blog, they are very useful.
    I’m getting the same error that you mentioning here, the problem is that the SSIS package I’m troubleshooting is a File System package and can’t get the option to select TargetServerOption.
    Basically the package isn’t under any project when opening it with Visual Studio, and in turn cannot see project properties. Any advise on that?

    Reply
  • Hey,

    I am facing a similar problem where I created a package in visula studio 2017 and the package was executing successfully. I saved the package in our STAGE file system and created a job in SSMS 2017 to run against the package. I get the same error as above. I even changed the targetversion to SQL Server 2016, then I get the message
    Description: Exception has been thrown by the target of an invocation.
    When I tried to execute the package in visual studio itself after changing the version I get this kind of error. But when I changed the version back to SQL Server 2017, it works fine again.

    ANy help is appreciated.

    Reply

Leave a Reply

Menu