Error: DTS Script task has encountered an exception in user code : Cannot load script for execution

Padmanabhan, Venkatesh 246 Reputation points
2020-11-11T04:06:14.83+00:00

Hi.

I am using SSIS. I have solution which contains multiple packages.

Each package contains multiple data flow tasks and script tasks . Most of the things were working earlier, but suddenly the script tasks are giving error as: DTS Script task has encountered an exception in user code - cannot load script for execution, while running the package.

I have not changed any code in between. variable names had some changes, but they were reversed to original name. I have tried opening the script task - clean and build it. Build succeeded. But again fails before ny of the code in script task is executed .

If I copy the code to a new script task, the new script task works. I have around 80+ script tasks across all the packages and it would not be possible to create new packages.

How to fix this?

Thanks

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

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,906 Reputation points
    2020-11-11T06:11:00.297+00:00

    Hi @Padmanabhan, Venkatesh ,

    If I copy the code to a new script task, the new script task works.

    It seems that the code in the old script task has been broken.

    1. Please edit script and save the script in the script task.
    2. Please set a breakpoint in script to find the error code.

    Hope the following links will be helpful:

    1. Debug a Script by Setting Breakpoints in a Script Task and Script Component
    2. Script Task Debugging in SQL Server Integration Services (SSIS)

    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.
    Hot issues in October--Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet.


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.