Where are 'libraries' stored in the database? Is that 'DirName' column in 'AllDocs' table, or something else?

(Doing some king of investigation)

  • 4
    Just want to caution you that any change to SharePoint databases might mean that the farm becomes unsupportable by microsoft
    – Sudhakar
    Commented Aug 30, 2016 at 15:31

3 Answers 3


To get only libraries name with SQL , You can get it from [WSS_Content] database at [AllLists] Table with [tp_BaseType] = 1 and for list [tp_BaseType] = 0

The final query should be like

SELECT TOP 1000 [tp_Title]  
  FROM [WSS_Content].[dbo].[AllLists] where [tp_BaseType] = 1

enter image description here


Have a look at this CodePlex solution- you can browse/download the code to get an understanding of how documents are stored in SP2010. (Not applicable for SP2013)



I found the location: libraries are stored in the table '[AllLists]', column 'tp_Title' is the name of the library.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.