Free up Database space after deleting documents

In a Document Library of SharePoint 2007, deleted documents will be put on Recycle Bin first (this is the default setting). SharePoint Recycle Bin works similarly to Windows one – user has their own recycle bin and one can not see others. Items in recycle bins will be permanently deleted after 30 days.

You may want to free up some database space by emptying your recycle bin, but it won’t work. If you check database tables, you will find that the records are still in [AllDocStreams] table and the database size is even bigger (because of transaction log). What if you want to get rid of the junk (i.e. you want to back up the current site)?

Log in as site administrator and click on “Recycle bin” under “Site Collection Administration” section. Click on “Deleted from end user Recycle Bin” view on the left, and delete the items there. This time the database records will be really deleted.

This “double” recycle bin might come to handy when someone mistakenly delete items from his/her recycle bin.  Do not like it? You can turn this feature off in Central Admin site. In Application Management->Web Application General Settings page, turn off the “Second stage Recycle Bin”. You can also turn off the whole recycle bin or change settings here.

This entry was posted in Document library and tagged . Bookmark the permalink.

3 Responses to Free up Database space after deleting documents

  1. Josh Norris says:

    Thanks for posting this!

  2. Scott Robertson says:

    Thanks! Just wondered if you know of a way to delete all records that are currently sat in the “Deleted from end user Recycle Bin”, rather than deleting them a page at a time?

  3. Shab says:

    Thanks for sharing this, very much helpful

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s