If you are using Microsoft Windows SharePoint Services in a large environment, such as at an Internet Service Provider (ISP) or in a large intranet, you need to be able to maintain control over your server resources and carefully monitor areas such as storage space and site security. You must be able to ensure that one user's site cannot use so many resources that other sites can no longer function. Windows SharePoint Services allows you to specify quotas for sites, so that you can manage your site and server resources.
When you set a quota limit for storage, you can set two values: a warning value and a maximum value. When a site passes the warning limit, an e-mail message is sent to the site administrator and owner notifying them that their site is near its storage quota. E-mail messages are sent daily until the storage level drops below the warning level. When a site meets the maximum limit, another e-mail message is sent to the owner and administrator, and no new content can be added to the site. Note that before e-mail messages can be sent, you must configure the e-mail server settings and be running the Microsoft SharePoint Timer service. For more information, see Configuring E-Mail Settings and Scheduling Timed Jobs.
Note The size of the data reported by quotas does not necessarily match the size of the storage in the database. This is because the quota feature estimates storage figures for empty sites (sites that contain no user content) and includes those figures in the quota, as well as the actual storage from the database. The estimated size of an empty site includes the real size of the template pages for Windows SharePoint Services, such as the forms pages and pages in the _layouts directory, which are not normally counted, since there is only one copy of these pages for all sites. Although each site has a unique URL to the pages, the site does not have a unique instance of the page.
You can create multiple sets of quotas, called quota templates, and use them in different areas or your server farm, or to suit different users. For example, in a large intranet setting, you could have the following quota templates:
- Test — Applied to free or demo sites; restricts users to 10 MB of storage.
- Standard — Applied to monthly-chargeback sites; allows site owners up to 25 MB of storage.
- Premium — Applied to sites for large teams; allows organizations up to 10 GB of storage.
You must be an administrator of the local server computer or a member of the SharePoint administrators group to be able to manage quotas and quota templates.
Enabling Quotas
The quota feature is disabled by default in Windows SharePoint Services — there are no default quota values or templates. To enable quotas, you use the following methods:
- To use quotas for your server or server farm, you create a quota template.
- To use quotas for a particular virtual server, you assign a default quota template to that virtual server.
- To use quotas for a particular site collection, you assign a quota template to the site collection when you create the site collection.
- To use a set of quota values for a single site only, you can apply specific quota limits to the site itself, independent of any quota template.
You can reverse your decision to use quotas at any point in the hierarchy. For example, applying a default quota template to a virtual server does not mean that all site collections under that virtual server must use the quota limits — it only means that they can. Settings that you apply to a single site can be cleared if you no longer want to use quotas.
About Quota Templates
Quota templates and the settings specified in them are stored in the configuration database for your server or server farm. Quota values apply to site collections and are applied when you create a site collection. You can specify a default template to use for all site collections created on a virtual server, for example, or you can specify the template to use when you create the site collection. The values listed in the quota template are copied into the database for the site collection and are referenced from there.
If you change the values for a quota template, those changes apply only to new site collections created by using that template, not to existing site collections. To update the quota values for large numbers of existing site collections, you can use the object model or an SQL query. For details on using the object model, see the SPSite object in the Windows SharePoint Services Software Development Kit. You can run queries similar to the following against your content databases to update quota values:
- To update the storage quota:
Update sites set diskquota=<new storage amount> where <search criteria>
To update all sites that use a quota template, you must run the query for all content databases in the server farm.
When you delete a quota template, the template is removed from the configuration database, but any site collections created using that template retain the quota values. If you want to remove quotas from all sites using a particular quota template, you must use the object model or perform an SQL query. For more information about using the Windows SharePoint Services object model, see the Windows SharePoint Services Software Development Kit.
Managing Quota Templates
You manage quota templates from the SharePoint Central Administration pages for your server or server farm. You can create or delete templates or change the values in the templates.
Create a quota template
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage Quota Templates.
- On the Manage Quota Templates page, in the Template name section, select Create a new quota template.
- In the Template to start from box, select a template to base your new template on.
- In the New template name box, type the name to use for your new quota template.
- In the Storage Limit Values section, select the Limit site storage to a maximum of: ___ MB check box, and then type the amount of storage to allow at a maximum.
- Select the Send warning e-mail when site storage reaches ___ MB check box, and then type the amount of storage to allow before sending a warning e-mail message.
- Click OK.
When you click OK, the new template is added to the list of available templates, and the page is refreshed.
You can delete a quota template if you change your quota structures. However, remember that deleting a quota template will not delete quota values from sites that were created using the quota template. If you want to remove quotas from all sites using a particular quota template, you must use the object model or perform a SQL query.
Delete a quota template
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage Quota Templates.
- On the Manage Quota Templates page, in the Template name section, select Edit an existing template.
- In the Template to modify box, select the quota template you want to delete.
- Click Delete.
When you click OK, the template is removed from the list of available templates, and the page is refreshed.
You can change individual quota values in a template. The new values apply only to new site collections created using the quota template. The changed values are not applied to existing sites unless you use the object model to update the values in the database.
Change an existing quota template
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage Quota Templates.
- On the Manage Quota Templates page, in the Template name section, select Edit an existing template.
- In the Template to modify box, select the quota template you want to change.
- Update the options you want to change, and then click OK.
When you click OK, the template is updated, and the page is refreshed.
Specifying a Quota Template for a Virtual Server
When you extend a new virtual server, you can specify a quota template to use as the default quota template for that virtual server on the Extend and Create Content Database page. Any new site collections that you create under the virtual server will automatically use the values in the default quota template. You can change the default quota template for a virtual server from the Virtual Server Settings page. Keep in mind that changing the default quota template does not change quota values for existing site collections. Only newly created site collections will use the new quota template.
Change the default quota template for a virtual server
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Virtual Server Configuration section, click Configure virtual server settings.
- On the Virtual Server List page, select the name of the virtual server you want to change.
- Under Virtual Server Management, click Virtual server general settings.
- In the Default Quota Template section, select the quota template to use as the default template when new site collections are created.
- Click OK.
Specifying Quota Values for a Specific Site
If you want to specify a different set of limits for a particular site, you can do so. Specifying quota values for a single site is an easy way to turn on quotas on a site-by-site basis. Similarly, if you need to make an exception to a quota template for a particular site, you can change the quota value for just that site. Keep in mind, however, that it is possible to lock a site simply by changing the quota value. If you already have quotas set for a particular site, and you want to update the value, be sure to check the site's current quota levels before making the change. For example, suppose the current quota level for site storage is 25 MB, and a site has 21 MB. If you change the value to 20 MB, the site will be locked as soon as you save the change. To prevent locking a site accidentally, be sure to check the current storage or invited user count for the site before making a change to the quota values.
If you do not know what the existing quota values are for a site, you can use the SharePoint Central Administration page to view the current values and the current data (storage used and number of users) for the site.
View current quota values and data for a site collection
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage site collection quotas and locks.
- In the Select a Top-level Web Site section, type the URL in the Enter the top-level Web site URL box, and then click View Data.
- In the Site Quota Information section, view the settings listed to see the quota settings and current values.
To view the current data for a site collection, you can also use the Site Collection Usage Summary page for the top-level Web site.
View quota data for a site
- On the site collection you want to view data for, click Site Settings.
- Under Administration, click Go to Site Administration.
- Under Site Collection Administration, click View site collection usage summary.
After you have checked the site quota data, you can change the quota values for a site. Note that this action does not change the quota template, and the change does not affect any site except the site you specify.
Change quota values for a site
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage site collection quotas and locks.
- In the URL of Top-level Web Site section, type the URL in the Enter the top-level Web site URL box, and then click View Data.
- In the Site Quota Information section, change the Limit storage to a maximum of __ MB amount, Send warning e-mail when site storage reaches __ MB amount.
- Click OK.
Managing Locks
You can use locks to stop sites from exceeding your storage quota limits, and to block all users from accessing a site if necessary. Sites are locked to block new content automatically when they exceed the maximum storage quota. You can also lock a site manually to block all access, if, for example, it is in violation of your site use policies. Depending on the type of lock, the result of a locked site is different:
- When a site is locked for exceeding a storage quota limit, users who attempt to upload new content see a disk full error.
- When a site is locked manually to block all access, users who attempt to view the site will see an access denied message. When a site is locked manually to block new content, users who attempt to add content see a disk full error.
Sites can be unlocked by different methods, depending on the reason for the lock. Site administrators can unlock sites by themselves if the sites are locked for exceeding quota limits. Only a server administrator can clear a manual lock. The following table lists the lock reasons and methods for unlocking sites.
| Lock reason |
Server administrator action to unlock |
Site administrator action to unlock |
| Storage limit exceeded |
Change the quota value. |
Delete excess site content or documents. |
| Manual lock by server administrator |
Clear the Adding content prevented or No access lock. |
None. |
If you need to lock a site and deny all users access to it, either temporarily or permanently, you do so by using the Manage Site Collection Quotas and Locks page.
Lock a site manually
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage site collection quotas and locks.
- In the URL of Top-level Web Site section, type the URL in the Enter the top-level Web site URL box, and then click View Data.
- In the Site Lock Information section, select Adding content prevented or No access.
-
If you lock a site with Adding content prevented or No access, you must type an explanation in the Additional lock information box.
- Click OK.
When a site has been locked manually, you can unlock it by using the Manage Site Collection Quotas and Locks page.
Unlock a site
- Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
- On the Central Administration page, in the Component Configuration section, click Manage quotas and locks.
- On the Manage Quotas and Locks page, click Manage site collection quotas and locks.
- In the URL of Top-level Web Site section, type the URL in the Enter the top-level Web site URL box, and then click View Data.
- In the Site Lock Information section, select Not locked, and then click OK.
Related Topics
Quota data is captured along with the usage analysis data for a site. For more information about the usage analysis process, see Configuring Usage Analysis.