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
0
votes
2 answers

SSIS:Capture [FileCreationDate] and [FileSize] of .csv files in separate user variables,inside a ForEachLoop Container using Script Task (C#) in CFlow

I have good experience in SSIS, but nil as far as Script Task and Script Component are concerned. I have a situation in which I am loading many .csv files into a SQL Server destination table. I am using a For Each Loop Container. I am loading these…
user3812887
  • 439
  • 12
  • 33
0
votes
0 answers

DTS Script task encountered exception in user code -client.Send(mail)

I have a script task to send an email on some data statistics sourcing the date from a view and it was all working fine until last week however suddenly without any modifications to the code, the script task suddenly now crashes with the error '…
0
votes
0 answers

SSIS Package bypasses task after Script Task completes

All: I'm using Visual Studio 2013. I'm at my wits end with this: For some odd reason my package ends abruptly at the highlighted area below (It's supposed to go directly to "Update File Log" execute SQL task but it ends at the previous Script…
Craig
  • 145
  • 1
  • 12
0
votes
1 answer

SSIS Script Task: Select from datatable1 into datatable2

I'm using SQL 2014, Visual Studio 2013. I have the following code that's part of a larger script task: //Load DataTable1 with Source Excel Sheet Data OleDbCommand oconn = new OleDbCommand("select * from [" + sheetname + "]", cnn); OleDbDataAdapter…
Craig
  • 145
  • 1
  • 12
0
votes
0 answers

SSIS did not execute script task upon deployment in SQL Server Agent

I have a SSIS job which the first task is to execute the script task. The script task is to check whether the file exists then proceed executing another task. It works perfectly fine when running in the VS and Integration Services. However, the…
Milky
  • 73
  • 1
  • 4
  • 12
0
votes
0 answers

VS2017 SSIS Running from a Job error out when a Control Flow contains Script Task

We are using VS2017 (15.8.4) SSIS running on SQL Server 2016. Our package would run to completion within VS without error. But when we use a SQL job that runs the package, it errors out immediately when the job starts. I've even taken all the…
0
votes
0 answers

SSIS Reference Error Oracle DataAccess - Call PL/SQL procedure with custom type parameters

I'm trying to call a PL/SQL procedure with custom type parameters from a SSIS Workflow. I tried: Using the ADO.NET connection manager for Oracle - doesn’t work, since it doesn’t allow for parameter mapping. Using the OLEDB connection manager - ok,…
0
votes
1 answer

SSIS - Programmatically Execute Package Task Using VB

I'm trying to programmatically create an 'Excute Package Task' in SSIS using Visual Basic. However I can't get it to work with UseProjectReference = True. The package doesnt fail but nothing happens. Am I missing some other property? Here is the…
DC07
  • 293
  • 5
  • 18
0
votes
2 answers

Is it possible change Object variables value in Script Task with ForEach then store it in Object variable?

I use VS 2008 SSIS. I have a Data Flow Task to get rows from table and store them in an Object variable. I use Foreach Loop to get the Object variable's value one by one. Inside my Foreach I use Script Task to change/decrypt my variable's value…
Ange
  • 5
  • 1
  • 3
0
votes
1 answer

dynamic datatype not working in SSIS script task

I declared a variable as below in script task dynamic sqldata = Dts.Variables["User::sqldata"].Value; When I try to click OK for script task component, error coming as below But when I replace dynamic keyword with object or var, which works…
Satishakumar Awati
  • 3,604
  • 1
  • 29
  • 50
0
votes
1 answer

how to get a variable's value from Script Task in ssis

I have this code below in one of my Script Tasks in SSIS: public void Main() { string filename; filename = Dts.Variables["User::FileName"].Value.ToString(); string getEmployerId =…
S.Vojnovic
  • 97
  • 2
  • 11
0
votes
0 answers

Error message while downloading excel file from web portal using ssis Script Task

I am wondering if someone can help me with something. I created an SSIS package (using script task) to download a file from Web portal and then process it. However, package worked fine for few months but started failing over last 2 days. I am…
user3482527
  • 227
  • 1
  • 2
  • 22
0
votes
1 answer

Parse unstructured flat file on SSIS

I have a problem parsing the unstructured text file. I tried to upload everything into one column with data type DT_STR but it throws error since there are special characters like '=' in my file. I tried with DT_TEXT data type, it worked well. But I…
krpa
  • 84
  • 1
  • 13
0
votes
0 answers

SSIS - use project connection manager in generated package

I have a SSIS package that generates and executes other SSIS packages at runtime. I can create a package in a Script Task and add connection managers: Package pckg = new Package(); // Create source ODBC connection …
0
votes
0 answers

SSIS Script Task Error in C#

I want to read a Excel file from Script Task. Add below code in the C# script file. when execute the script it gives the below error. help me to solve the issue.