Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

SharePoint 2010 – Quick retrieval of Site Collection Size

Posted by Paul on November 7, 2012

In this article we can see how to solve a real life scenario involving retrieving size of libraries & lists.


Your customer site collection exceeded 100 Giga Bytes in size. You are assigned to create a Site Collection Size report that shows the Library & List entries along with the Size. The report is crucial to take decisions on possible migration of items into separate site collection.



Following are the solutions possible:

1. Iterate through each list / library entries and calculate size of file, file version, recycle bin. This way would be time consuming and may timeout on large site collection execution.

2. Use StorageManagementInformation() method for quicker retrieval


For implementing the solution using the second approach:

· Create a Windows Forms application

· Add reference to Microsoft.SharePoint assembly

· Set the project property > build > target platform to Any CPU

. Add the following controls to the main form.


On click of the execute button add the following code.

private void ExecuteButton_Click(object sender, EventArgs e)


using (SPSite site = new SPSite(UrlText.Text))


// Retrieve Document Library entries

DataTable table = site.StorageManagementInformation(






// Retrieve List entries







grid.DataSource = table;



Squadron for SharePoint 2010

A SharePoint utility application is created with the above functionality. You can download it from:

Following is the screen shot on execution of Squadron:


For retrieving Site Collection Size information, click on the Site Size item from the left pane and then the Execute button. You should get the result as shown below.


For saving the result, right click on the grid and use the Export Data option.



In this article we have explored a quicker approach in retrieving site collection size entries. I hope the information is useful and please note that the above information is available through Central Administration as well. The method StorageManagementInformation() is a deprecated one and should not be used with very large row count parameter, as it may raise memory issues. The source code for the article is attached.

The Squadron tool is free and it contains other utilities too for working with SharePoint 2010. In future I believe there will be more and more utilities available as Squadron core is built using plugin based architecture.


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