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
1 answer

Limitation to 255 character Even while sending Email through Script task in SSIS 2008 R2

I was using the Send Email task but it has a limitation of 255 characters in To List/Recipient List. Then i switched to Script Task where in i am using: MailMessage mail = new…
Ankit
  • 21
  • 1
  • 2
1
vote
1 answer

Meta Data refresh while looping through tables in SSIS

The situation: I have a list of queries written so that each select data from their respective table. I want to create this list of queries as an SSIS object variable and iterate through each one, using the query as a OLE DB source in a DFT. Is…
Tribalnecktie
  • 150
  • 2
  • 8
1
vote
2 answers

Move files with SSIS to different directories dynamically based on excel file names

How to move multiple excel files to different folders based on file name in ssis? means based on the file name it will move to respective folder.
Ajit Kumar
  • 107
  • 1
  • 6
1
vote
0 answers

Script Tasks losing code in SSIS 2016 (VSTA 2015)

I have an SSIS package with a number of For Each ADO Loops, each with a single script task, which are usually working fine. However, every so often, the script task will suddenly 'forget' all the code in task. I'm presented with an empty task…
1
vote
2 answers

Excel not opening generated from c#

I am trying to store Datatable in excel which is generated in c# (SSIS ScriptTask). Below is my code: OleDbDataAdapter A = new OleDbDataAdapter(); System.Data.DataTable dt = new System.Data.DataTable(); A.Fill(dt,…
Kinchit Dalwani
  • 398
  • 4
  • 19
1
vote
2 answers

How can an object not equal itself? (SSIS Script Task)

The problem is in the middle of Main at the line that reads if ((byte[])Dts.Variables["User::EncryptionKey"].Value == noKey) When GetEncryptionKey 'fails' and returns noKey, the 'if' still takes the 'else' path and I don't see why. I tried this…
bielawski
  • 1,466
  • 15
  • 20
1
vote
1 answer

Appending Header Record in Flat file SSIS

I have created an SSIS package which goes from OLEDB Source to Flat File Destination. Now what I want to do is append an extra rows before and after the records. I already have Column Header in Flat File. Appending an extra row at the end can be…
Kinchit Dalwani
  • 398
  • 4
  • 19
1
vote
1 answer

SSIS script task add existing file to project as link causes binary not to be found

I thought this would be simple, but I guess not. Here is what is happening. I create a new package and add a script task to it. I open up the script task and edit the script (C# 2010). In the solution explorer, I right click the project name…
1
vote
0 answers

SSIS script task validation error upon

I am getting the following error in SSIS Script task (SSIS 2015) Adding Data to var:Error: The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully. …
1
vote
1 answer

Using DTS Variable for file path using XDocument.Load

I am trying to load an XML file in an SSIS Script task. This works: var fullpath = "E:/perforce_ws/EnterpriseTrunk/SSIS/Inbox/RCT_Import_1.xml"; var xml = XDocument.Load(fullpath); But this doesn't: var fullpath =…
Matthew Nelson
  • 105
  • 1
  • 8
1
vote
0 answers

SSIS web service script throwing binding error?

I am new to scripting (new to SSIS as well); I am trying to consume a web service URL and trying to generate XML from it. The way the web service is configured, I cannot use a Web Service Task in SSIS, so I am trying to use the script task but I am…
Nik
  • 11
  • 4
1
vote
1 answer

Consuming a REST API row based in SSIS Script Task

I am looking for a way to consume a REST API in an SSIS Script Task with C#. I cannot use RestSharp or the Microsoft.Aspnet.Webapi.Client because they are not in the GAC. I need to call the Rest API (POST) for each row to get a result and then write…
l0wsk1ll3d
  • 11
  • 1
  • 2
1
vote
1 answer

Does OLE DB command supports dynamic independent queries in ssis?

Earlier, I was running many sql query and was coping the eaxtract in csv file manually. Now, I am trying to make a ssis package which does the same. I have used OLE DB Source in for-each loop to do this. But thats not working. So am i doing right?…
Kinchit Dalwani
  • 398
  • 4
  • 19
1
vote
1 answer

SSIS package fails on file.delete of script task

I have an SSIS package, zip.dtsx. This package successfully runs on serverA. I copied this package in serverB. However, when I try to run zip.dtsx on serverB, it fails. zip.dtsx just reads a file in a source folder, compresses it, saves the…
Krish
  • 319
  • 4
  • 19
1
vote
2 answers

How to encrypt password in SSIS script task?

So I have a script task in an SSIS package that accesses email. ExchangeService service = new Microsoft.Exchange.WebServices.Data.ExchangeService(ExchangeVersion.Exchange2010_SP1); service.Credentials = new…
user3486773
  • 1,174
  • 3
  • 25
  • 50