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
1,154 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 250 total points
ID: 34120310
0
 
LVL 6

Assisted Solution

by:subhashpunia
subhashpunia earned 250 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now