Josh C
Josh C

Reputation: 441

Finding SharePoint lookup list values in the database

This is a repost, but I'm trying to articulate my question a little better.

I am trying to find out where data for SharePoint List Fields are stored in the Content Database when the fields are lookup values. Like in this post: https://stackoverflow.com/questions/9137557/sharepoint-list-lookup-values-in-the-database I know that you're supposed to read the XML and find the correct column in the AlUserData column. That works fine when the data is a "Single-line-of-text". What I see, though, is that if it's a lookup value, the column referenced in the XML will be null. Does anyone know why this is, or how I can find the lookup values?

Upvotes: 0

Views: 3436

Answers (1)

gdbdable
gdbdable

Reputation: 4501

(1)You can select data directly from content database, from AllUserData table. For build correct sql query i can suggest use "SPUD" utility. How to use:

  1. open it, enter sharepoint url
  2. select list to query
  3. right click -> generate list sql
  4. copy and execute in Sql management studio

In query results you can find column value.

(2)But i suggest to use Sharepoint Object model, with some optimization it works quick up to 500K items.

(3)Try use "Linq to sharepoint" to perform big query to list by one CAML request

Upvotes: 0

Related Questions