Looking for deleted files in SharePoint by using SQL backups.

Posted on 2014-11-20
Last Modified: 2015-10-21
I have a project where I have multiple SharePoint SQL databases from different points in time.  These different points in time are being retrieved from full SQL backups.  I am trying to determine if any documents were deleted between each backup.  This is in SharePoint 2010 RTM.

There are two methods that come to mind to accomplish this.  I wanted to get input regarding this.  If there is another method to do this, it would be great to hear.

1)      In the dbo.AllDocs table use the DirName and LeafName column to build the path of the file.  Once I have the path, I can do a comparison to see if it exists in the other databases.

2)      Use the Id column in the dbo.AllDocs table to uniquely identify files.  I am assuming this would be unique across all databases.  It would also help determine if a user deleted a document then try to put it back in place.

Any input would be greatly appreciated.
Question by:rye004
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
  • 3
  • 2
  • 2
LVL 40

Expert Comment

ID: 40455884
If you have the Audit Log reports already configured then you could use that  one to check for "Deleted and restored items" and many more - please see details at:
LVL 37

Accepted Solution

Neil Russell earned 500 total points
ID: 40455942
Doing anything that relies on direct queries of the SharePoint Database itself is a very time consuming, last resort, effort  due mainly to a system that has not been configured and managed correctly.

Sharepoint is not designed to managed or monitored by access to the SQL database.  Not to overstress the fact but if you are having to access the physical SQL tables then your SharePoint system is set up optimally.

Concentrate on the configuration and setup of SharePoint as it is meant to be used first and foremost.

Author Comment

ID: 40456048
Icohan, I do not have the audit log files.
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

LVL 37

Expert Comment

by:Neil Russell
ID: 40456076
Correction to my above post. Should say....

"Not to overstress the fact but if you are having to access the physical SQL tables then your SharePoint system is NOT set up optimally."
LVL 40

Expert Comment

ID: 40456081
In that case I think you could use the same script from link below to get the delta's - it is under "Ran the following SQL Script to review all files that had changed since 17th March against the mounted "

Author Comment

ID: 40456084
This is the last resort and a onetime deal.  Performance is not a concern.
Thank you for your comment.

Author Comment

ID: 40456557
Thank you everyone for your input.  I ended up going with my second option in my list above.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

734 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