Solved

Export Sharepoint 2010 LIST to SQL nightly

Posted on 2014-03-27
4
3,374 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 18

Expert Comment

by:Walter Curtis
ID: 39963856
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
ID: 39965773
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
ID: 40016324
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
ID: 40485821
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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Database Inventory 7 33
t-sql left join 2 36
SSL configuration In sharepoint 2013 9 12
Sql group by orderdate and ordertotal 3 12
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.

710 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