View Complete Post
We are using Execute Process Task in SSIS package to execute a batch file to house keep the generated flat files which are older than a week from the archive folder.
The same batch file is used to delete the some temp files generated in the process.
As the Archive folder and temp folder paths are configurable, we are trying to pass the folder paths as parameters to batch file.
I used Expressions tab of Execute process Task Editor to map the variable to Arguments property. This is working fine. but I need to pass one more variable as an Argument.
Can some one help me how to achieve this. Thanks in advance.
<cname>United Arab Emirates Dirhams</cname>
public void Main()
String URLString = "http://www.xe.com/dfs/datafeed2.cgi?beeline";
XmlDocument doc = new XmlDocument();
XmlTextReader reader = new XmlTextReader(URLString);
XmlNodeList currencynodes = doc.SelectNodes("currency");
foreach(XmlNode currency in currencynodes)
XmlNode csymbol = currency.SelectSingleNode("csymbol&quo
I have placed a script task in my SSIS project, package.
When I click Design Script button, script editor is not opening, instead its returning to Control Flow. But no error.
What is the problem?
I just created a new folder in D:\ drive with the name My SSIS.
I could not find the exact details on how to create a SSIS script that would ftp files on these forums, so I am adding my code to help save time for anyone else that might be wanting to do something similar.ÃÂ Here is the VB code for my script task to FTP files (hope this helps someone):
' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.
it is possible to start ssis packages with dtexec and set variables as package configuration like this:
dtexec.exe /SQL "\mart1\import_fact_calls" /SERVER "R08" /SET \package.variables[FullImport].Value;True
Now I'm trying to start a package via script task with this code:
Public Sub Main()
Dim pkg As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult
If Dts.Variables("package").Value <> "" Then
pkg = app.LoadFromSqlServer(Dts.Variables("package").Value, "R08", "USER", "PASS", Nothing)
pkgResults = pkg.Execute()
Dts.TaskResult = ScriptResults.Success
How can I add a package configuration like the one with dtexec to the script code?
I like any ideas, links, docus ... Thanks!
I am trying to use a custom assembly (compiled with VS 2005 framework 2.0) with SSIS 2008. I understand that I need to put this Assembly in the GAC. I initially attempted to do this using the GACUtil, but I apparently only have version 1.1
of GACUtil intalled on my development PC. Shouldn't version 2.0 have been installed as part of VS 2005?
So I then tried simply copying the dll into the GAC folder using windows explorer. Well, the dll is now visibly in the GAC folder, but I cannot see it from either VS 2005 or BIDS 2008. Does that mean I do need to use GACUtil 2.0 or higher to
install the DLL into the GAC? If so, is there any place on the Web that I can download it?
I have to upgrade from SQL Server 2000 DTs to SSIS 2008. The DTS modify the dtspumptask dinamically. I dont now hot to do the same.
I tried to do the same with variables but queries have more than 4000 characters.
I am using a "Script Task" component. I am trying with following three simple steps:
1) Obtain the excel content in HTML
Dim reportInHtml As String = GenerateHTMLReport()
2) Generate an excel with below code:
Dim message As MailMessage
message = New MailMessage(fromAddress, toAddress, subject, String.Empty)
Using memoryStream As MemoryStream = New MemoryStream()
Dim contentAsBytes As Byte() = Encoding.UTF8.GetBytes(reportInHtml)
memoryStream.Write(contentAsBytes, 0, contentAsBytes.Length)
Dim contentType As ContentType = New ContentType()
contentType.MediaType = "application/ms-excel"
contentType.Name = "Excel_Report.xls"
The requiement is to create excel file. I cannot run this code using SSIS vbscript task because this requires Microsoft.Office.Interop DLL which can not be installed on the dev / prod server. Hence using the SQL task the data exported to excel.
But now the excel is required to be updated to merge some cells. The approach we are thinking is to keep VBS file with required code to UNC path. Keep the BAT file running VBS file using CSCRIPT command in same location. Call the BAT file from SSIS package
using Execute Process Task. This approach is tested in local system and also works on dev server. But somehow the sample code used to create excel is not creating excel to UNC path.
VBS code below
Const xlSaveChanges = 1
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.Cells(1, 1).Value ="Test value"
The BAT used to call above VBS file is given below
The above UNC path is used in execute process task package which runs fine. But the file is not yet created.