SSIS 2005 How to add a zip task? - ssis

I have a ssis 2005 project.
I have to add a zipping task.ie, i have to zip a text file.
But i have to follow DB standards of the ORG. strictly.
1) No 3rd party software in the DB server.Not even resourec kit tools
2) No exe's in the DB server.
so i cant use(windows resource kit tools,7-zip, and a execute process task to invoke a c# exe.)
please suggest me a way to achieve zipping in ssis without compromising the DB standards.Any zip task is available as an addin to SSIS 2005?
Thanks
SNA

You could use a Script Task, and write code using the GZipStream class to compress the file.

Related

Linq to Sql Classes missing from within a script task in visual studio 2013 in an SSIS package

I'm trying to migrate an existing Visual Studio C# project to run in a script task in an SSIS package.
The current C# console application uses "Linq to Sql Classes" to generate a dbml file and the necessary classes.
But when I go to edit the script task in the SSIS PACKAGE I'm not able to find the LINQ TO SQL CLASSES. I right click on the project and select "add -> new item" and look for the "Linq to Sql Classes" item to add the dbml file to my project but it's not there?
Confusing because if I do the exact same thing in Visual Studio 2013 in a console application, I'm able to add the "Linq to Sql Classes". Does anyone have any ideas? I realize I could use Entity Framework but that would take a considerable amount of time to re-write everything. Also I've thought about just executing the console application's compiled executable from within the SSIS package but our database team will not allow packages to run executables.
Also I'm targeting the .net framework 4.0 for both the Visual Studio 2013 console applications and from within the Visual Studio 2013 editor in the SSIS Package Script Task.
I stumbled across this question because I have(had) this exact same problem. We had an existed DataContext file which had been mapped to a database. I had updated the database which SSIS but my changes werent being reflected in the Script task. I created a seperate project and created a linq-to-sql file and connected it to the same database as my Script task. Then added all the existing tables and the new one too. which generated a new Datacontext file. I then copied the code back into the original Datacontext file within the script task.
Hope this helps you and future programmers

Compress files using SSIS Process Task

I am trying to zip excel files using SSIS Process Task. This task asks for Executable. Unfortunately on the machine where I am executing SSIS, does not have any 3rd party provided compression utility. All I have is Windows built in compressor. I want to know how this can be used as executable and zip my files.
Thank you for your time.
You could use 7zip's command line version without installing it.
http://www.7-zip.org/download.html
Also, if your excel files are outputed as '.xlsx' they are already compressed. This is also true for any other office type that ends in an 'x'. Try changing the extension to '.zip' and open them.
Edit: Depending on how much you're doing you might want to consider buying the Cozyroc package which includes a zip task as well as many other useful ones. Not too costly either.
http://cozyroc.com/
I just want to add this note about cozyroc
You can test and develop with the SSIS+ components for as long as needed to determine if the components are suitable for your needs.
When you run the SSIS package from the command line with DTEXEC or SQL Server Agent, the license verification code is activated.
If a license is not found, the package execution will fail, the first time it tries to use SSIS+ library component.

DTS :How to migrate HTML data source into SSIS?

I need to migrate the DTS (SQL 2000) package into SQL 2008 SSIS.
The DTS package is using HTML file data source and a Transformation task to import the HTML table
into the SQL table.
I didn't find the HTML data source in the Connection Manager in the SSIS designer.
Does this functionality exist in the SSIS ?
Thank you.
If it is well formed you could try and run it through as xml source; but I suspect that you may run into issues when it wants a schema.
Another option is to create a custom data source script component to read the file. this would require a little bit of C# knowledge
Good luck

How to create a MS Word document using SSIS package?

Using Script Task, I have written a code to create a folder and create a MS Word document inside the newly created folder. It is working on the local machine but it is not working on the server where the package is deployed to. The folder is created successfully, but the Word document file is not created. For Word document creation, I had to refer another DLL where I had included an additional namespace Microsoft.Office.Interop.Word. Is there anything else to do before deployment ?
Based upon rfonn's comments, your choices are as follows:
Install Word 2007 on the server.
Re-do your package on a dev box with Word 2003 installed and deploy to your server.
Use some other tool to generate the Word Document.
SSIS is generally used for movement of data, so while it is possible to do what you are doing, it is likely not the best tool for the job. If you are capable of writing code in a script task to do what you want in SSIS, it is possible to write a program (VB or C# or any other tool you choose) to do the same thing without SSIS being wrapped around it. My money is on option #3 being your best choice.
I guess you missed installing the Office PIA.
After installing the relevent PIA according to your Office version, add a reference to microsoft.office.interop.word (.NET) file in your project (ssis script in VS).

SSIS 2005/2008 - How do I allow multiple tasks to have a common target task?

In VB pseudocode, I'm trying to accomplish the following using SSIS (either 2008 or 2005)
If FileHasAlreadyBeenDownloaded = False Then
DownloadTheFileFromFTP
End If
ImportTheDownloadedFile
To do this in SSIS I have a script task to check for the file, and if it exists it transfers directly to the DataFlow Task using conditional expressions. If the file doesn't exist, it transfers to the FTP Task, and the FTP Task transfers to the DataFlow Task.
It seems, though, that I can't have two tasks lead into one common shared task, because no matter which path the code takes it won't execute the DataFlow Task. If I make a copy of the DataFlow task and have each path go to its own Task, then all works perfectly.
Is this a documented thing with SSMS that I just haven't found? I looked through 31 pages of questions on SSMS before posting, so hopefully this isn't a stupid question.
I also tried using Expressions on the FTP task to set "Disabled=#FileAlreadyDownloaded=True" but that works only in SSMS 2008 and didn't seem to work in SSMS 2005.
Thanks so much for any pointers on this!
It might be worth trying putting the script task and the FTP task inside a container task, and link the the container to the data flow task on success.