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

SSIS Script Task - Convert VARCHAR to NVARCHAR Using C#

I'm using SQL Server 2014 Enterprise and Visual Studio 2103. I have hundreds of TSV files that contain foreign characters that I'm importing into SQL Server. I have a SSIS package that automates this (just a script task that I found online that uses…
Craig
  • 145
  • 1
  • 12
0
votes
1 answer

SSIS Script Task - Not picking any ddl

Trying to add Newton.json & Restsharp in SSIS's Script task. But while adding I am getting a warning message also the script not working. An attached screenshot will add more points to this question.
0
votes
0 answers

using Script Task in SSIS to read in CSV files

I have a series of csv files that will SOMETIMES use a double-quote. I'm following the guidacne from techbrothers IT: http://www.techbrothersit.com/2016/03/how-to-create-tables-dynamically-from.html I have multiple files, each with unique schemas,…
arcee123
  • 101
  • 9
  • 41
  • 118
0
votes
0 answers

Calling SSRS from SSIS: Some the PDF files gets corrupted

I am calling SSRS from SSIS Script task and stores the report in PDF format. Below is my code in Script task: Protected Sub SaveFile(ByVal url As String, ByVal localpath As String) Dim loRequest As System.Net.HttpWebRequest Dim loResponse…
Kinchit Dalwani
  • 398
  • 4
  • 19
0
votes
0 answers

MQ client 8.0.0.4 type initializer error when called from ssis script task

While migrating from mq dot client 1.0 to mq 8.0.0.4, receiving following error when call mq manager is made. call is made from a script task from ssis 2012 package. call to mq manager works when called from a windows service. Inner Exception :…
0
votes
0 answers

ExecuteNonQuery: Connection property has not been initialized - loading parameters from Foreach loop

#region Namespaces using System; using System.Data; using Microsoft.SqlServer.Dts.Runtime; using System.Windows.Forms; using System.IO; using System.Data.SqlClient; #endregion namespace ST_564774fbfa9f46 { public partial class ScriptMain :…
Kishore
  • 1
  • 1
0
votes
2 answers

Dynamic Folder SSIS

I am creating a package that goes through a few folder paths and loads excel files. The file paths for the excel files are as follows. The files are located in "a" folder which is named the same from year to year, however, the "xy*" folder name…
Hmen
  • 41
  • 6
0
votes
1 answer

Delete Certain Range of Content on Excel Using Script Task on SSIS

I'm Trying to Delete some range(A2:BC2000) of Content on Excel using Script task on SSIS, or do you guys gave any alternate methods. Here is the code that i used Public Sub Main() Dim Wexcel As Microsoft.Office.Interop.Excel.Application =…
Bumblebee
  • 179
  • 1
  • 16
0
votes
1 answer

COMWrapper error in SSIS script task while converting an .xls document to CSV

I hope someone can help me with my SSIS automation error. I created a package that downloads a file from a webportal. In second step of my package, i convert that .xls to .csv(there is a valid reason for this conversion as downloaded .xls file can't…
user3482527
  • 227
  • 1
  • 2
  • 22
0
votes
1 answer

SSIS 2008 Script task compile failure: Cannot load script for execution

I'm running SSIS 2008, and I'm getting 'Cannot load script for execution.' error when running the script below. I'm able to build this script when editing script task, but it crashes when I run a package. I've tried multiple variations of this…
Leo Dan
  • 23
  • 6
0
votes
0 answers

Script task to download excel file from "Sharepoint Online" with Office365 Credentials

I am a frequent SSIS user but not a frequent Script task user. I am trying to download a bunch of excel files from SharePoint Online(https://company.sharepoint.com/xyz/file1.xlsx), I have a set of office 365 credentials that are to be used for…
Dhananjay Rele
  • 13
  • 1
  • 2
  • 7
0
votes
0 answers

How to import Excel xml files in sql server uisng SSIS

Looking for some help please. I am trying to build an SSIS package that will download a file from a web-portal every hour and will load it in to SQL table. Now, i have a script task in my package that will download the file. Initially i downloaded…
user3482527
  • 227
  • 1
  • 2
  • 22
0
votes
1 answer

SSIS Rename files by replacing part of filename

Remove the circled part of the filename There are two types of files in folder x:\abc\sales\ one is a compressed .gz file and the other is uncompressed .txt file My aim is to rename all the ".txt" files:(leaving the .gz files untouched) Eg.…
0
votes
1 answer

What can be the resolution of Query timeout expired issue

I am facing an issue while running SSIS package using Microsoft Visual Studio Thing is, this issue does not occur all of time. The error message: Error: Query timeout expired N.B: The error occurs in a script task, my guess is, there is a…
BlackCat
  • 1,932
  • 3
  • 19
  • 47
0
votes
0 answers

SSIS script task fails to write to Object variable

I'm using a script task to download a CSV file from a Share Point library, I can use File.ReadAllLines() and the code will write the data from my data table to the System.Object variable just fine on my dev machine but fail when deployed to the…