Solved

Export Sharepoint 2010 LIST to SQL nightly

Posted on 2014-03-27
4
3,160 Views
Last Modified: 2014-12-07
I have a SharePoint 2010 Foundation and I would like to have a single list exported and then imported into my SQL 2008 (or 2005) machine. I need this because I need to build a clean automated email report nightly. Currently I have Data Source with SharePoint List data source type but the reporting is limited.

What is my best option? My true goal is to get this list into a SQL table so I can build real reports using Visual Studio.
0
Comment
Question by:allenkent
4 Comments
 
LVL 14

Expert Comment

by:SneekCo
Comment Utility
You could do this with PowerShell. There are other ways of course, but PowerShell might be a good solution for you.
0
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
Comment Utility
You could always query the WSS Content database directly in SQL and ETL the data out :) MSFT discourages direct querying of the content databases, but we've done it a number of times without issue and it's the most straightforward way to do it.

Alternatively, and in a totally supported fashion, you could go the route of creating a .NET SQL-CLR assembly that queries the SharePoint Webservice to fetch the contents of your list, and then returns them to SQL in the form of an output table you can merge directly into your data warehouse:

http://www.sharepointjohn.com/sharepoint-2010-sql-server-2008-query-the-sharepoint-object-model-from-a-net-sql-server-clr-function/

We've also done this before, and it works excellently. It's a bit more work up front, but it's smooth once it's deployed, and a random service pack won't break it because you're going through the official channels to get your data (as opposed to a query on the WSS Content database, which could break at any time as, again, it's unsupported).
0
 

Author Closing Comment

by:allenkent
Comment Utility
This got me on the right path. The following video ended up answering step by step on how to do this process.

https://www.youtube.com/watch?v=O0OjT_VEObI
0
 
LVL 1

Expert Comment

by:G4lly
Comment Utility
You can also look at AxioWorks SQList which will continuously export SharePoint Online and SharePoint onpremise lists, libraries, files and attachments into normalised SQL Server Tables.

Really useful when wanting to write complex SSRS reports or if you want to surface the data on the web etc via ASP .NET etc.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

772 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