[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

import outlook pst file to a table sql server

Posted on 2014-08-13
3
Medium Priority
?
1,245 Views
Last Modified: 2014-08-20
Hello,

is it possible to import pst file to sql server?
if yes, how ?
Thanks
Regards
0
Comment
Question by:bibi92
  • 2
3 Comments
 
LVL 36

Expert Comment

by:ste5an
ID: 40258568
Yes. E.g.

SET NOCOUNT ON;

CREATE TABLE #Blob ( [Blob] VARBINARY(MAX)  );

INSERT  INTO #Blob
        ( [Blob]
        )
        SELECT  *
        FROM    OPENROWSET(BULK N'<HardCodedPathToYourFile>', SINGLE_BLOB) O;

Open in new window


But why would you do this?
0
 

Author Comment

by:bibi92
ID: 40258661
My question was not complete, I have to import the contents of PST file this form date, sender, message body, attached Thanks
0
 
LVL 36

Accepted Solution

by:
ste5an earned 2000 total points
ID: 40260077
This requires some .NET programming, thus it has nothing to do with SQL Server..

You can automate Outlook, attach the .pst and browse it. And push the content to SQL Server.
You can use third-party library like PST.NET. Then you don't need an installed version of Outlook.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

834 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