Skip to main content

Posts

Showing posts from June, 2012

How to use pass variables in Execute SQL task

Here is a post where I actually did to pass variables into SQL query using Execute SQL task. Here is my condition that I need to count number of rows in one table and need to pass this count value into a variable and then  using that variable I need to insert into a table. For this Purpose let me take a table named 'Dim' under Database 'test' and similarly I will take one more table called 'fact' under database name 'test' again. Using SSIS, I will take Execute SQL task on workspace, In fact two as we need two executions has to be done. Let us create a variable as we discussed earlier of this task purpose and I'm creating a variable called "testing". Right click on first Execute SQL task, go for edit and here, I will configure as shown in snippet below. Here importantly we need to set ResultSet as Single row as ResultSet option will activate Result Set tab of Execute process t

Zip/Unzip multiple files and also include password for zipped file using SSIS

We have many scenario that we need to Zip many files which we come across and then so some operations like either sending it as a email or just moving zipped file to some other destinations etc. But we were using manual method to zip multiple files. In this post, I tried to create a package which will zip multiple files using SSIS. Here for Zipping files purpose, I'm using 7-ZIP which is free software available in google sites. Download files and install onto your system. First let me show how to Zip on file and later I will show how to zip multiple files using SSIS and 7Zip tool. Compressing Single file. Here I'm trying to Zip one single flat file which is of 40MB size. I kept this file in C:\Documents and Settings\\Desktop\test\source folder. Now to compress this file, I will open my SSIS and I'm dragging and dropping EXECUTE PROCESS TASK from Control Flow. Now right click on Execute Process task and go for edit and select Process option. In process tab,