• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1449
  • Last Modified:

Strip email attachments to import to SQL 2012


We have a requirement to get incoming email attachments stripped from their original email and imported into SQL 2012.  At this stage they're looking to create a new machine running the Sperry outlook add-in software to strip attachments from emails and save them to a folder that is then imported into SQL 2012.  

I know this would work, as it is something that we have already tested, however it does introduce another point of failure.  Just trying to find out if there are other options that minimize the components in the process and simply use Exchange and SQL.

Currently we are running SQL 2012 and the email system is Exchange 2010 SP1.

If anyone knows a way to do this without the 3rd party computer\software it would be appreciated.

1 Solution
Barry CunneyCommented:
Hi Dave,
One option may be to look at using Powershell/SSIS to do the work, all contained in a single SQL Server job.

In SQL Server you can create a job step of type Powershell, so in such a job step you could use powershell to interface with Exchange Services to save off the attachments into a folder.

Then you could design a pre-defined SSIS package which you could execute from a second step in the same SQL server job.
The SSIS package would have a For Each Loop container which would loop through all the files in your 'attachment' folder and in the loop would be a Data Flow task which would actually import the data from the attachment files into the database.
biggles70Author Commented:
Looks like this is a workable solution, however due to time frames the DBA won't have time to look into it further.  Thanks for the info, as I think he might revisit when time permits.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now