?
Solved

Extract Query result from SQL server in SSIS into CSV flat file , Compress CSV and send the CSV File by email

Posted on 2010-11-12
3
Medium Priority
?
1,186 Views
Last Modified: 2013-11-18
Hello,

I have a query to extract records of about 7 million rows in SSIS from SQL server. I then need to dump the data as CSV , and then compress the CSV file to be able to mails it using my smtp server with the send mail task.

The tricky part is :   How to compress the CVS fils in SSIS possibly using a Script component.

Your help is appreciated .Other solutions will be accepted apart from my requested solution.

Thanks
0
Comment
Question by:marvo2010
3 Comments
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34119964
You could use a operating system comand an do it that, i have seen this done before which worked fine. You just need to be able to execute a zip program.
0
 
LVL 19

Accepted Solution

by:
Bhavesh Shah earned 1000 total points
ID: 34120310
0
 
LVL 6

Assisted Solution

by:subhashpunia
subhashpunia earned 1000 total points
ID: 34120382
You can perform these tasks as below:

1. Export to CSV : can be performed by SSIS
2. ZIP : You can use shareware tools like 7-zip command line and use the command like 7za.exe ....
3. Mail the file by using the SQL server's Database Mail utility. To know more about how to configure database pls check this post:

http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question