Free up Database space after deleting documents

March 28, 2008

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.


IE crashes when opening office document from SharePoint

March 20, 2008

Suddenly, my IE crashes when I open any Office document from SharePoint document library. It turned out to be a component in Office 2007 causing this, even I only have SharePoint Designer installed. Microsoft has a fix: http://support.microsoft.com/kb/938888. It worked.


Send To->Email a Link doesn’t work

March 12, 2008

In SharePoint 2007′s Document library, the Send To->Email a Link context menu will open your local email client and put the link of that document in the email body. However, it seems URL encode the whole URL, instead of just the relative path.  So the URL will end up like this:

 http://subdomain%2Ecompany%2Ecom/Documents/folder/subfolder/My%20File.doc

Basically, the dot (.) in the domain name is also URL encoded (%2E). If you copy and paste it to IE it will still load, but clicking it from Outlook doesn’t work.

To fix it, open CORE.js from  \12\TEMPLATE\LAYOUTS\1033, fine this line:

 fileUrl=escapeProperly(httpRootWithSlash.substr(0, slashLoc))+currentItemUrl;

and replace it with this:

fileUrl=httpRootWithSlash.substr(0, slashLoc)+currentItemUrl;

I found OWS.js (in same folder) also have this. But changing CORE.js alone will fix it. I don’t know what’s the difference between these 2 files.


Menu not found? Here are direct links…

March 11, 2008

Depends on what site template you use to create your site, some menus appear in one site but not on another. Here are some links that you can type in directly after the site/sub-site root to get that function:

  • Save site as template: _layouts/savetmpl.aspx (this feature allows you to take a copy of the sit – option to include the content as well – and to create a new site from it.) However, there is a limit of the size of the content – 10 MB. Content will be excluded if the content is more than that. Same for list template.
  • Welcome page: _layouts/AreaWelcomePage.aspx

Follow

Get every new post delivered to your Inbox.