Questions tagged [script-task]

The Script task provides code to perform functions that are not available in the built-in tasks and transformations that SQL Server Integration Services provides. The Script task can also combine functions in one script instead of using multiple tasks and transformations. You use the Script task for work that must be done once in a package (or once per enumerated object), instead than once per data row.

Do not use this tag for the SSIS Script Component, instead use .

Check the following article for more information: SSIS Script task vs. Script Component


Based on the official SSIS documentation, SSIS tasks are categorized as the following: Data Flow Task, data preparation tasks, workflow tasks, SQL Server tasks, Analysis Services tasks, maintenance tasks, custom tasks, and scripting tasks.

The SSIS Script Task extends the package functionality by using scripts. It performs functions that are not provided by the standard Integration services tasks.

363 questions
2
votes
2 answers

SSIS package - Script task does not get executed when triggered through SQL Job Agent

I have an SSIS package that creates 2 text files using a data flow component. It connects to an SQL database and if the query returns data, the 2 files are created. After that, a script task loops through the folder where the 2 files are written…
Daniel227
  • 127
  • 9
2
votes
1 answer

Passing filename from SSIS script task

I'm attempting to create a SSIS package that loads a flat file into a SQL server table. I've been able to piece the loading functionality together. I'm currently stuck on passing the filename if it's found from the script task back to a variable…
SJJ9166
  • 71
  • 1
  • 6
2
votes
1 answer

Open, Save then Close xls file in C# as part of an SSIS Scripted Task

I have an SSIS package that pulls data from auto-generated xls files. the Microsoft Jet Engine 4 Driver will only recognise the xls documents once they've been opened and saved so I need to add a C# scripted task to automate this step. I know…
2
votes
1 answer

How to use SSIS variable outside Main() method in SSIS Script Task

I am using SSIS script task to send automated e-mail based on a few pre-conditions. As part of that I have a SendAutomatedEmail() method and in this method I am passing two variables mailServer and recipient. In doing so I run into the error "object…
ITHelpGuy
  • 969
  • 1
  • 15
  • 34
2
votes
0 answers

SSIS package containing script task getting failed in Azure Data factory

I have recently moved SSIS packages (with target server version as 2016) to azure SQL database. I have followed below steps: Created azure ssis IR in azure data factory Created pipeline with execute SSIS package activity. When I trigger this…
Yogesh Irmal
  • 111
  • 1
  • 1
  • 7
2
votes
0 answers

Script Task Error : Insufficent System Storage. The server response was : 4.5.3. Too many recipients (AS780090)

I have created a simple SSIS package with SMTP task/C# to send an automated email to a couple of recipients. When I run it manually from Visual Studio 2017, it is working fine for one recipient or a couple of recipients, but when I deployed and run…
Rafael
  • 21
  • 3
2
votes
1 answer

SSIS Variable- Evaluating Expression Taking Time in Script Task

I have a Variable which uses another variable to get its value. I had set the EvaluateAsExpression property to True. Now when I use this variable in a Script task it is taking 2-3 Minutes to evaluate that expression. But if I Hard Code the variable…
2
votes
1 answer

Error: 0x1 at XX: Exception has been thrown by the target of an invocation

I am trying to copy files from an FTP server to a local drive using C# Task script in SSIS. The script ran well in SQL Studio 2008 R2, but there was a version update to 2016 using SQL SSDT (SQL Server Data Tools) 2015, and when I first executed the…
Sast77
  • 97
  • 1
  • 9
2
votes
1 answer

Is it Possible to create drop down columns in Excel sheet using SSIS Script task with C# Language?

I am trying to create drop down columns in already existed Excel Sheet using Script task. I know that we can do it using C# but not sure is it possible in SSIS Script task. If it is possible please guide me. I am new to SSIS technology.
Chandana Puppy
  • 133
  • 1
  • 9
2
votes
1 answer

Cannot open a Script Task, but only one specific SSIS package, any suggestions please?

For only one particular SSIS package (v. 2005) I am getting the following error when trying to open the script task... TITLE: Microsoft Visual Studio Cannot show the editor for this task. ADDITIONAL INFORMATION: The operation could not be…
DazSheps
  • 21
  • 2
2
votes
0 answers

How can I fix "Error: Exception has been thrown by the target of an invocation." Error in SSIS Script task sending to multiple emails

I'm setting up email alert using SSIS script task. The code works when CC field is only one email but gets an "Error: Exception has been thrown by the target of an invocation." for multiple emails. This pulls data from a view in SQL database. I…
Bryan Tercenio
  • 21
  • 1
  • 1
  • 3
2
votes
0 answers

SSIS Package with SSRS report in script task doesn't work if run through agent job or TSQL

I have SSIS package which contains VB code in script task which downloads the SSRS report in excel sheet. When I run the package manually from SSDT it works but when I run through agent job or TSQL it runs but no data gets populated in the excel…
2
votes
1 answer

'C# script task to remove quadruple quotes before loading .CSV file"

I have a fairly basic SSIS package that will load a .csv file into a SQL table. However, when the package is attempting to read the .csv source in the data flow task I receive the error message: "The column delimiter for column 'X' was not found. …
ManMadeNova
  • 57
  • 2
  • 14
2
votes
2 answers

SSIS Copy files from one location to another

I want to copy a specific file from one location to another. I have a Message Box that prints where the file is copied source and destination as per below: I get the below error:
2
votes
1 answer

SSIS - 2nd Script Task not being executed in Foreach Loop Container

I have 2 script tasks in my foreach loop container in an SSIS package. See picture. The first script task Determine which file is presented gets executed just fine. However, the second one Archive Broker File does not get executed at all. I can see…