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
1
vote
0 answers

Execute SSIS (package) in SSMS using T-SQL and return a value

Using VS (2019) I created an Integration Services Project to code an SSIS package. The goal was to call a Web API from an SSIS package using input variables like username/password/url and so on. I successfully achieved this using Script Task and…
Abdullah
  • 137
  • 3
  • 13
1
vote
1 answer

How to execute a package task in a script task in debug mode in VS

I have an SSIS project containing two packages. Package1.dtsx should be called by Package2.dtsx. When doing so with an ExecutePackageTask, the debugger opens the second package once it gets called. Now I need to adapt the code so that I'm not using…
1
vote
2 answers

Loading Most Recent Excel File with SSIS: Script Task Debugging

I try to get the "Last modified" excel file in a folder and load it in SSIS. I found a C# code to get the name of most recent excel sheet in a folder path, and copy that in the Script Task. The code is : using System; using System.Data; using…
Aliz
  • 57
  • 6
1
vote
1 answer

How to send Dts information messages SSIS from event handler?

I have an SSIS package with a Script Task that calls some basic C# code. I'm using SQL SMO to copy a list of tables from DB1 to DB2. I have that working, but what I am trying to do is subscribe to the SMO event handlers and send progress messages…
William YK
  • 1,025
  • 12
  • 26
1
vote
0 answers

Assign result of a method to a variable in ssis script task using c#

I am using vs 2017 ssdt and would like to assign the result of a method to a variable in script task using C#. I am trying to do this outside of main method. I can read the SSIS variable values in the main method using dts variables but not being…
pbj
  • 663
  • 1
  • 8
  • 19
1
vote
1 answer

Is it possible to change Script Task namespace identifier in SSIS?

My script task is generating a namespace identifier that I'd like to change: ST_02bde10d5e6a49418f4de5fd87c4a777. It's simply not saving my changes. When I go to a file and then change its namespace identifier, as soon as I execute my task, it…
user13091630
1
vote
1 answer

Read excel file using oledb in Script task

I am trying to read data from Excel using the oledb command in the script task of SSIS. The excel does not have sheet names. I am getting error as the sheet name is empty. Below is the code used excelConnection = new…
Venkat
  • 89
  • 12
1
vote
2 answers

WebRequest The request was aborted, The request was cancelled

[EDIT] my mistake - showed the wrong line on which the error occured. I'm SQL Server developer not a .net developer so bear with me please. Consuming a 3rd party Rest API using a Script Task in SSIS (Visual Studio 2017) and getting the following…
Geezer
  • 513
  • 5
  • 17
1
vote
0 answers

HTTP Logic App Trigger via SQL Script Task

Triggering HTTP Post Request in Logic Apps from Script Task in SSIS. It works when I run it locally but not on the server via sql agent. Its running successfully in the server but not triggering the logic app. Any ideas on what I am missing? public…
1
vote
1 answer

Moving Excel Sheets From Workbook to Another Using SSIS

I have code that is supposed to move a excel template sheet into a new work book (See below) using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Office.Interop.Excel; namespace CodeCall { public…
Steven
  • 139
  • 1
  • 11
1
vote
1 answer

SSIS - How to use results of Execute SQL Task to call a Web Service

I need to use a result from SQL SELECT which should return an array of IDs to iterate through it in my foreach loop. I'm quite new to SSIS. I created Execute SQL Task, connect to DB and write SELECT ID FROM TABLE Then I created Script Task and…
soldous
  • 111
  • 1
  • 9
1
vote
0 answers

SSIS ScriptResults.Failure vs Dts.Events.FireError - default behavour?

I am debugging my package within Visual Studio 2015. If my script task ends with ScriptResults.Failure, package execution halts when the script finishes, ie the next task in Control flow does not execute. If my script task raises a…
1
vote
1 answer

script task in SSIS under for loop each container takes lot of time to complete

enter image description hereI need to execute a c# code for each record which i get from a table I pass these records using for each loop container in SSIS . Which calls the script task for each record. In the script task i have a c# code which…
1
vote
1 answer

Variables not generated in script task

For some reason my variables which I have added to the readonlyvariables(also tried readwritevariables)are not generated in code when I want to use them in code. What am I missing? I've added this script task in the Control Flow. When adding it in a…
Miscode
  • 57
  • 8
1
vote
0 answers

I have trouble inserting all of the items from my SQL Server table to my SharePoint list

I'm using an Execute SQL Task from where I get all the rows from my SQL Server table, and then I use a full result set to get all my data. Then I go to my ResultSet and I put my object variable that I name 0. After that I use a Foreach Loop…