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,142 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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 about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

760 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

21 Experts available now in Live!

Get 1:1 Help Now