A script task is not functioning as expected at runtime when I use targetserverversion2019 on SSIS 2019

Chapagain, Dilli R 96 Reputation points
2021-01-07T03:01:26.647+00:00

On my local machine, the package runs fine with any targetserverversion, but when I load it into SQL Server Management Studio the script task doesn't work as expected at runtime environment. SQL job/package run successfully, However, the "Script Task" doesn't appear to be executing at all with targetserverversion2019. But when I change targetserverversion to 2014 it seems working fine.

Any suggestion to fix this problem will appreciate.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,681 questions
{count} votes

Accepted answer
  1. Chapagain, Dilli R 96 Reputation points
    2021-01-08T17:51:25.61+00:00

    Hi @Monalv-MSFT , @Yitzhak Khabinsky

    Looks like I found the issue/solution-

    I have been deploying my .ispac using .bat file (reason for my problem)

    ISDeploymentWizard /S /SP:"%~dp0\xxx.ispac" /DestinationServer:"xxx" /DestinationPath:"/SSISDB/xxx/xxx"

    pause

    To resolved this, I have altered my environment Variable in the below order (on my window 10 machine). No more Script task issues using targetserverversion2019 on runtime now using with .bat file deployment.

    54984-image.png


2 additional answers

Sort by: Most helpful
  1. Monalv-MSFT 5,921 Reputation points
    2021-01-07T03:27:36.32+00:00

    Hi @Chapagain, Dilli R ,

    However, the "Script Task" doesn't appear to be executing at all with targetserverversion2019. But when I change targetserverversion to 2014 it seems working.

    1. Please use select @@VERSION; in SQL Server Management Studio to check the version of SQL Server.
      54272-sqlserverversion.png
    2. Then please set the TargetServerVersion according to the version of SQL Server.
      54208-targetserverversion.png
    3. It seems that your script task is created in the version of SQL Server 2014.

    Best Regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Yitzhak Khabinsky 26,491 Reputation points
    2021-01-07T03:24:55.797+00:00

    SSIS has two environments:

    1. Dev. environment, on the development workstation where Visual Studio is installed.
      TargetServerVersion setting value specifies future run-time environment.
    2. Run-time environment, on a server with SQL Server + SSIS installed.

    VS's TargetServerVersion value shall match SQL Server version in the run-time environment,

    After that you need to open Script Task in edit mode, and go to the Build menu, and rebuild it.
    It will recompile that Script Task for the TargetServerVersion value. And make sure that you see a "Build Succeeded" message in the Output pane.

    UPDATE
    Please make sure the following:

    • SSIS run-time server has the same .Net Framework version installed as specified in the SSIS Script Task.
    • VS2019 is updated up to the latest version: v.16.8.3
    • SQL Server Integration Services Projects extension is updated up to the latest version: v.3.11.1
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.