WSS2: Changing quotas on sites… after its created

04 May

My boss came to me today and asked me about setting quotas on the sites collections in our sharepoint (wss2) server. We have created all sites in on contentdb and its running around 80% now. I did a quick search around the central administration web site for the server, but I could not find any page that allows me to manage the quota of an existing site collection.

To set quota after the site is created, you would need to dive into COM objects and your scripting skills. The COM object SPSite from the Sharepoint SDK has a quota properties which you can use to change the quota templates.

And here is how you can do it: Changing Quota Template Names in SharePoint V2:

SPGlobalAdmin globalAdmin = new SPGlobalAdmin();

SPGlobalConfig globalConfig = globalAdmin.Config;

SPQuotaTemplateCollection templates = globalConfig.QuotaTemplates;

foreach(SPQuotaTemplate template in templates)


if(template.Name == “Personal Site”)


template.Name = “Modified Personal Site”;


Console.WriteLine(“Quota Template name changed!!”);




Of course an alternative to quotas is to make anyone coming to you for a sharepoint site to provide you with their own contentdb in Managing Content Databases in WSS v2.

One major advantage my team have with our sharepoint service server is that we have the database team’s site hosted on the same contentdb as the rest of us… so when the database runs out of space, the database team will be affected and they will have to increase the database size! 👿

Leave a comment

Posted by on May 4, 2007 in Windows



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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: