views:

6843

answers:

11

Edited: What is the easiest way to scrape extract SharePoint list data to a separate SQL Server table? One condition: you're in a work environment where you don't control the SQL Server behind the SharePoint Server, so you can't just pull from the UserData table.

Is there there any utilities that you can use to schedule a nightly extract?

Is Microsoft planning any improvement here for "SharePoint 4"?

Update Jan 06, 2009:
http://connectionstrings.com/sharepoint
For servers where office is not installed you will need:
this download

A: 

Depending on the exact nature of the data you need to insert, it may be possible to just use the auto generated RSS feed to get the information you want, a process will need to read the rss and formulate a query.

Otherwise a consoleapp/service could use the object model to do the same thing, but with more control over field information.

Nat
+3  A: 

Scraping? As in screen scraping? Are you serious? ;)

2 Options

SharePoint Object Model - http://msdn.microsoft.com/en-us/library/ms441339.aspx

SharePoint Web Services - http://msdn.microsoft.com/en-us/library/ms479390.aspx specifically the Lists web service

The web services is how Excel/Access communicate with SharePoint to integrate with its lists.

In fact a bit of Google foo gives these two results :-

Connecting SQL Reporting Services to a SharePoint List

Accessing SharePoint List Items with SQL Server 2005 Reporting Services

Ryan
Actually depending on where your solution is deployed, you may be limited to only one of those 2 choices. While you can always use the web service option, the object model is only available if your solution is running on the sharepoint server.
Tundey
Good point - for many reasons the WebService is the better option (e.g. more scalable as it will use any web farm not single server) but the downside is that it isn't as rich as the object model. Since Excel/Access use it under the hood for there operation it should be rich enough though.
Ryan
Didn't mean screen scraping.... maybe bad choice of words. I meant data scraping, or pulling, or extracting.
tyndall
Though you might Bruno, hence the smiley. WebSerices is the way to go
Ryan
A: 

As Ryan said I would also suggest using object model / web services to store data to separate SQL database. I think that the best approach is to write an event handler that will trigger on your least and copy the data user inserted/updated.

Toni Frankola
A: 

I wish something like this was much easier to do. Something that didn't need SSIS and was boiled down to a console tool that reads a xml config file for source/target/map info.

http://blogs.officezealot.com/mtblog/archive/2008/06/03/importing-list-data-into-sql.aspx

tyndall
+1  A: 

Regarding your query about "SharePoint 4", Bill Gates made some remarks at SharePoint Conference 2008. He suggests enriching SQL tables with SharePoint data, and goes on to mention several other potentially cool things. What exactly he means and whether it will help solve your problem in the future is hard to say until we start seeing betas of WSS4 / MOSS 14.

Alex Angas
Will be interesting to see how "sparse columns" works itself into mix too.
tyndall
+2  A: 

There is a SSIS SharePoint task you can use to grab the data info a regular dataflow: http://www.codeplex.com/SQLSrvIntegrationSrv

A: 

The 2 minute answer is to use Data Synchronisation Studio from Simego ( http://www.simego.com ) just point it at your List and database and it will sync all the changes.

Not bad if you have $749.95 to throw at a hole in Microsoft's strategy. Still wonder what the options for SharePoint 4 will be.
tyndall
A: 

I would go with the simego software, but i dont have the money, maybe a 15 days trial is enough!

I guess I just think this should be standard. Included in the money you pay for SharePoint. The API to get this data out of SharePoint should be callable from a standard ODBC driver.
tyndall
+1  A: 

If you have MOSS installed, the Business Data Catalog can be setup from the Sharepoint Central Administration to automagically synchronize data for you. This is a very powerful product and is included with MOSS. I love it when a client has it enabled so I can take advantage of it.

But some don't and for myself, I've found that if they don't have BDC running and available, inevitably they don't give developers many rights to SQL Server so SSIS is generally out of the question (but maybe that's just me). No problem; for those I'll pull together a lightweight EXE that runs on a scheduled task that queries Lists.asmx and pushes changes to a SQL Server table. Fairly trivial stuff for a simple list where nothing is deleted. Get yourself Visual Studio 2008, CAML Builder, and prepare for a good time. The Lists.asmx results is a little funny in that a list's row's fields are each a single node with a lot of attributes, with no child nodes ... something like this off the top of my head ... just remember that when coding ...

<z:row ows_Id="1" ows_Field1="A1" ows_Field2="B1"/> <z:row ows_Id="1" ows_Field1="A2" ows_Field2="B2"/>

Complications in code occur with copying lists where items are deleted, or where there is a parent/child relationship between SP lists. You'd think I'd have some code to send you, but I haven't bothered putting together something I could reuse.

I'm sure there's other ways of handling it, but the scheduled task EXE so far has been reliable for me for multiple apps for multiple years.

Thanks for the info. +1. In my situation (current company) BDC is off the table due to pricing. Wonder how this functionality will be packaged in the next SharePoint?
tyndall
A: 

We’ve recently launched a commercial product called SQList that makes this process much easier, and should be relatively cost effective given the time and complexity of the custom development approach.

It takes the pain out of creating clean, normalized SQL Server tables from your SharePoint lists and libraries. SQList is a Windows service; all it needs to access your SharePoint data is a user with at least read permissions and it will keep your SQL tables constantly up to date.

Find out more here: http://www.axioworks.com/sqlist.aspx

+1  A: 

i wrote some code to achieve it, you can find it over here

extract data from moss 2007