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

How to check email for file using c#?

I receive an email with an excel file every week. I know there are probably better ways to accomplish my goal, but would it be possible to have a script task in SSIS that can open email, look for a specific file name as an attachment and then copy…
user3486773
  • 1,174
  • 3
  • 25
  • 50
1
vote
1 answer

store string values into object and use later

I would like to store file names that are processing into variable? and then later using this variable (file names) to move these files into proccessed folder. I am using foreach loop where dataflow task process each file and storing file names into…
user2841795
  • 375
  • 3
  • 10
  • 25
1
vote
3 answers

Output the System.Object variable value to a flat file in SSIS

I am sorry if this question is a repeat. I have a system.object variable where I store results for a select query. I need to output the results to a flat file to further process it. I have the following piece of code that works for couple of seconds…
rvphx
  • 2,324
  • 6
  • 40
  • 69
1
vote
1 answer

SSIS Script Task for moving files based on their file extension

I have the following code contained within a Script Task in SSIS 2012. public void Main() { string inputDir = (string) Dts.Variables["User::InputDirectory"].Value; string CSVFolder = (string)…
Hannah McDade
  • 87
  • 1
  • 7
1
vote
2 answers

Breakline in ssis message does not work

I am creating a message inside a string using a Script task The code would look like this: Message = Description +"\n" + Message; The idea is to receive a message like this: Description Description and so on Within a messagebox I can see this…
d2907
  • 798
  • 3
  • 15
  • 45
1
vote
0 answers

SSIS: Exception has been thrown by the target of an invocation

I have a SSIS package to perform incremental processing of the cube. In the sequence container in this package, we have a script task to count the number of rows. and the code in script task is as follows : public void Main() { …
Dennyc
  • 63
  • 12
1
vote
1 answer

SQL Server 2012 SSIS Script Task for sending mail from Gamil to Gmail , showing "DTS Script :Runtime Error"

I am using SSIS 12, SQL Server 2012, Visual Studio 2012 and .net 4. My SSIS script task code(for sending mail): // Introduction to the script task /* The Script Task allows you to perform virtually any operation that can be accomplished in * a .Net…
RU Ahmed
  • 558
  • 4
  • 23
1
vote
1 answer

SSIS Script task- how can I give dynamic directory name and file name in script task?

I am not good at c#. I got script task that deletes the existing file from directory, I got variable that holds both directory value and file value. how can I use those variable values in this code?: public void Main() { // TODO:…
user3583912
  • 1,302
  • 1
  • 17
  • 23
1
vote
0 answers

OLEDB Source dosn`t receive Sql Statment from Skrip Task

I have a problem with script task. I have a Package where Foreach Loop Container contains Skriptask that creating Sql Statment into Variable. Variable is defined early and contains default value When after execution SkriptTask I`m trying to create…
1
vote
2 answers

SSIS Script Task Fails when run from SQL Agent

I’ve delete and rewritten this question as I don’t think I was being clear and it caused some frustration. I have a SSIS package that creates and populates an Excel sheet, the package runs perfectly and creates the files as desired and can be…
GPH
  • 1,817
  • 3
  • 29
  • 50
1
vote
1 answer

Extract from password protected Zip files

This is my requirement, I need to extract files from password protected zipped files. I would like to know if there are any code snippets available. I am using SSIS to download these zipped files from an FTP. Is there any latest update to the 4.5…
Prakazz
  • 421
  • 1
  • 8
  • 21
1
vote
0 answers

Missing ConnectionManager namespace in BIDS 2008R2 Script Task

I recently had to rebuild the operating system (Windows 7 Pro x64) on my development machine and reinstalled SQL Server 2008 R2 with all options for SSIS then applied SP3 and installed both SQL Server 2005 Backward Compatibility x64 and the SP3…
1
vote
1 answer

SSIS-Calling java service using Script Task

I am trying to call a java base web service method writing following code in script task's entry point method. Following code get executing properly if i call from console application but while calling from SSIS control flow, upto message box 1 it…
paul sim
  • 463
  • 2
  • 10
  • 23
1
vote
1 answer

Extracting string array from SSIS variable

I have two script tasks in my SSIS package. The first one saves a string array as a package variable: // In 1st script task: String[] astrCustNames = new String[cust_count]; /* ... * Some code to add strings to array ... */ // Add array to a…
Buggieboy
  • 4,636
  • 4
  • 55
  • 79
0
votes
0 answers

Enable to get bucket location, using default endpoint

I have a script task in SSIS 2008 which should upload data from S3 Bucket. Now, I faced an issue and receive such error: GetRegionCode - unable to get bucket location, using default endpoint: s3.us-east-1.amazonaws.com System.Exception: Request was…