Thursday, November 18, 2010

SharePoint wss_content log file keeps growing

The another day I received a request to check an issue with our production SharePoint Server 2010. The user could not save edited documents or upload documents to the library. Different error messages pop up. After further investigation, we found that the SharePoint database server is running out of disk space. The database file check showed that the largest data base is the wss_content (Of course, it's the SharePoint content DB).  Surprisingly, the log file wss_content.ldf had triple size of wss_content.mdf.

So we backed up the log file and then shrink the log file to get back lots of space. Then the problem was gone. Meanwhile, we limited the wss_content.ldf  to a fixed size to avoid this growth.

However, one month later, the problem reoccurs again. And if you check the serer log, you will find following error
 
Unknown SQL Exception 9002 occurred. Additional error information from SQL Server is included below.
The transaction log for database 'WSS_Content' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
 

We have to repeat the log backup to get back space. At the same time, we do more check on the database recovery mode configuration and find it's "Full" mode, that means, the log file will keep growing and once it's up to the throttle, it  will require the log backup. This is mandatory task because the "Full Recovery Mode" means, you can recover your database to an arbitrary point in time, which is based on the transactions in the database log file.

So if you don't want this point-to-time recovery possibility (maybe you already has backup plane for your database), you can just switch back the content db recovery mode to "Simple".

More information about More information of SQL Server, you can find here:

Recovery Model Overview

Thursday, November 11, 2010

Create shortcut link for adding Alert in Sharepoint 2010

In out-of-box blog template of SharePoint 2010, if we want to set up alert for the blog, we have to go to all site content -> lists -> post and then use the Alert ribbon in the List tab. Or if you are blog contributor, you can click on the quick like "manage posts" to switch to the posts list and then do the Alert setting. Neither of these is straightforward enough.

If we want to add shortcut for adding Alert for this blog, how are we going to do this?

Actually, SharePoint 2010 has centralized Alert management feature and there is a subscription page for every site in the farm. The page path should be similar with this one:
http://woss01/blog/_layouts/SubNew.aspx

As we see, it's under site "_layouts" folder. And it does support the "List" QueryString parameter so that we can pass the List GUID to set up alert for specific list.

To check what's the GUID for your list, we can always go to the list settings page. Right click on "Title, description and navigation" and copy the URL. Paste that into notepad and copy everything after "List=" in the string. That's your URL Encoded GUID for the list.

Once we identify the list URL Encoded GUID, here is the quick link of adding alert for this list: