Solved

Can I get the user information from the AllDocs database in SharePoint?

Posted on 2014-11-20
3
1,056 Views
Last Modified: 2014-11-22
I have a set of SQL SharePoint databases.  I am trying to find a way to get user information for file sin the AllDocs table.  It would be great if I could get the user for the created and last modified.

I am looking to do this with a SQL query.

Any help would be greatly appreciated.
0
Comment
Question by:rye004
[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
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Ray earned 500 total points
ID: 40456619
For SP 2013, assume your SP database name is WSS_Content.

SELECT  
(SELECT tp_title FROM WSS_Content.dbo.UserInfo where tp_ID = u.tp_author) as Author,
tp_created,
(SELECT tp_title FROM WSS_Content.dbo.UserInfo where tp_ID = u.tp_editor) as Editor,
tp_modified,
DirName as docpath,
leafname as docName
FROM WSS_Content.dbo.AllDocs d, WSS_Content.dbo.AllUserData u
where   d.siteid = u.tp_siteid and d.id = u.tp_docid
--OPTION
--and DirName = 'MySite/Shared Documents' and leafname  = 'MyDoc.xlsx'
0
 

Author Comment

by:rye004
ID: 40456661
Ckchan,

Thank you for your response.  I will try what you sent me shortly.

I am using SharePoint 2010 RTM.

Kind Regards,

Ryan
0
 

Author Closing Comment

by:rye004
ID: 40460095
This worked perfectly.  Thank you.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

690 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