How to find the SharePoint DirName, LeafName and ContentType of a SharePoint 2010 List using database?

1.3k Views Asked by At

In SharePoint 2003 there is a table called "AllUserData" which is used to store data for all lists and documents: http://msdn.microsoft.com/en-us/library/dd358229(v=PROT.13).aspx

I'm interested in 3 main columns in this table:

  • tp_ContentType
  • tp_DirName
  • tp_LeafName

In SharePoint 2010, this table exists; however, the above columns are removed or moved somewhere else.

Where could I find those columns associated with a sharepoint list/document in SharePoint 2010? To which table have they been moved?

I appreciate this requires proper understanding of the SharePoint 2010 database schema.

(reading from database structure directly is not the recommended approach, I know; just please answer my question if you can.)

What I tried was to find out the list of columns with a similair names with the below script:

select b.name as ColumnName, a.name as TableName
from sysobjects a 
    join syscolumns b 
        on a.id = b.id 
where a.type = 'u' and
     ((b.name like '%dir%')) or  (b.name like '%leaf%') or  (b.name like '%contenttype%'))
order by 2

It returned some tables and columns but I'm not sure this is the right way to find those.

I couldn't find any documentation about this either?

Hope the question is clear.

Thanks,

0

There are 0 best solutions below