Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Administering and Securing Sh... > Lesson 1: Manage Site Collections an...

4.2. Lesson 1: Manage Site Collections and Content Databases

In Chapter 1, you learned that site collection is a group of SharePoint websites—a top-level website and, optionally, child websites—that share common ownership and administrators, as well as common settings, such as quotas, locks, and site use confirmation and deletion. When you create a site collection, you must assign a site collection administrator. All other site collection properties can be left to their default values, or can be configured to your specifications.

A site collection is hosted in one content database. The content from all sites in the site collection is stored in that content database. A site collection cannot span more than one content database. The content database is the core component of storage management, including backup and restore.

In this lesson, you will learn more about site collections and content databases, including the details about their properties. You will learn to administer site collections and content by using both Central Administration and Windows PowerShell. And you will explore the reasons that it might be important for you to design your SharePoint farm with multiple site collections and content databases.

After this lesson, you will be able to:

  • Create and delete site collections.

  • Configure site collection settings, including ownership and administration, quotas, and site locks.

  • Create and configure content databases.

  • Move site collections between content databases.

  • Configure managed paths.

  • Identify the factors that determine how many site collections and content databases should be created, based on your governance requirements.

Estimated lesson time: 90 minutes


4.2.1. Manage Site Collections

Site collections can be created, deleted, and viewed by using Central Administration, Windows PowerShell, or Stsadm. This section details the procedures for Central Administration and Windows PowerShell. You can learn more about Stsadm site collection operations on Microsoft TechNet.

4.2.1.1. Create Site Collections

You can use Central Administration to create a site collection, or you can use Stsadm with the createsite operation. Chapter 1 includes the procedure to create a site collection by using Central Administration. In Chapter 2, you used Windows PowerShell to create a site collection with the New-SPSite cmdlet. Central Administration and the Windows PowerShell cmdlet are revisited in more detail later in this chapter.

4.2.1.1.1. Create a Site Collection Using Central Administration
Create a Site Collection Using Central Administration
  1. In the Central Administration Quick Launch, click Application Management.

  2. In the Site Collections section, click Create Site Collections to open the Create Site Collection page.

  3. In the Web Application section, ensure that you are focused on the web application in which you want to create a site collection.

    If necessary, click the Web Application picker, shown in Figure 4-1, and then click Change Web Application. The Select Web Application dialog box opens. Click the correct web application.

    Figure 4-1. The Web Application picker control

  4. In the Title box, type a title for the site collection.

  5. Optionally, type a description in the Description box.

  6. In the Web Site Address section, in the URL drop-down list, select the path to use for your URL. You can select the root path (/) or a wildcard inclusion path such as /sites/.

    If you select a wildcard inclusion path, you must also type the site name to use in the website’s URL.


    Note:

    ONLY WILDCARD MANAGED PATHS APPEAR

    Only the wildcard managed paths that have already been defined will be available in the drop-down menu. The sites managed path is created by default when you create a web application. See the section Section 4.2.5 later in this lesson for more information about managed paths.


  7. In the Template Selection section, select the site definition you want to apply to the top-level site of the new site collection—for example, Team Site on the Collaboration tab.

    Click the Custom tab to create an empty top-level website and apply a template later.


    Note:

    AVAILABLE TEMPLATES ARE BASED ON FEATURES AND CONFIGURATION OF THE SITE

    The templates that are available will vary, based on the features that are enabled and custom templates that have been installed. If you do not see a template that you believe should be available, ensure that appropriate features have been enabled and that the template you desired has been made available. Both of these settings are found on the Site Settings page: feature availability is configured using the Manage Site Features and Site Collection features commands, and template availability is configured using the Page Layouts And Site Templates command that appears when a site uses the Publishing Site site definition.


  8. In the Primary Site Collection Administrator section, in the User Name box, type the user name of the site collection administrator using the DOMAIN\username syntax.

  9. Optionally, in the Secondary Site Collection Administrator section, in the User Name box, type the user name of the secondary site collection administrator using the DOMAIN\username syntax.


    Tip:

    BEST PRACTICE DESIGNATE TWO SITE COLLECTION ADMINISTRATORS

    Designate a secondary site collection administrator to ensure that someone can manage the site collection when a primary site collection administrator is not available.


  10. Click OK.

    The site collection is created, and the Top-Level Site Successfully Created page opens.

  11. Click OK.


Note:

MORE INFO CREATING A SITE COLLECTION

The following article provides additional details regarding the creation of site collections: “Create a site collection (SharePoint Server 2010)” at http://technet.microsoft.com/en-us/library/cc263165.aspx.


Create a Site Collection Using Windows PowerShell

The syntax of a typical New-SPSite command is as follows:

New-SPSite -Url "<URL for the new site collection>"
-ContentDatabase <Content Database Name> -Name "<Name for Top-Level Site>"
-Template <Template> -OwnerAlias "<domain\user>" [-OwnerEmail "<e-mail address>"]
[-SecondaryOwnerAlias "<domain\user>"] [-SecondaryOwnerEmail "<e-mail address>"]

					  

Where:

  • <URL> is the URL of the site collection you want to create.

  • <Content Database Name> is the name of the content database within which the site collection should be created. This parameter is optional.

  • <Name> is the name of the top-level website. The name will appear in the title and heading of the top-level website.

  • <Template> specifies the site definition for the top-level site—for example, BLANKINTERNET#0, the Publishing Site, or STS#0, the Team Site. Use the Get-SPWebTemplate cmdlet to enumerate the available templates.

  • The required -OwnerAlias parameter’s <domain\user> value defines the primary site collection administrator.

  • The optional -SecondaryOwnerAlias parameter is used to define the secondary site collection administrator.

  • The -OwnerEmail parameter specifies the email address of the primary site collection administrator. The -SecondaryEmail parameter specifies the email address of the secondary site collection administrator. These parameters are optional but highly recommended. Without them, SharePoint cannot send email notifications regarding site quotas, site use confirmation, and deletion.

Note that when you create a site collection by using Central Administration, the email addresses of site collection administrators are automatically populated by looking them up in the Active Directory accounts of the administrators. When you use Windows PowerShell to create a site collection, you must specify the email addresses.

For example, the following command creates a site collection at the root of the intranet web application and creates a top-level site with the Publishing site definition.

New-SPSite -Url "http://teams.contoso.com" -ContentDatabase "SharePoint_Content_Teams"
-Name "Contoso Departments, Teams, and Projects" -Description "Collaboration sites for
Contoso departments, teams, and projects" -Template "STS#0" -OwnerAlias
"CONTOSO\SP_Admin" -OwnerEmail "SP_Admin@contoso.com"

					  

A close examination of the parameters of this command reveals that when you create a site collection—an SPSite object—you also create the top-level website—an SPWeb object—in the site collection. The -Name and -Description parameters configure the display name and description of the website, respectively. The top-level site can be configured to use a template, also called a site definition, by using the -Template parameter.

Although the site collection and top-level website are two different objects that are created simultaneously, and cannot exist without each other, you can optionally create one or more additional websites within the site collection, typically referred to as subsites or child sites.

4.2.1.2. Self-Service Site Creation

The name self-service site creation confuses many SharePoint administrators. The ability of users to create a subsite—a child website—within a site collection is controlled by the Create subsites permission, which is part of the Full Control permission set. Any user who has the Create subsites permission can create a subsite within a site collection. However, as you learned in Chapter 3, the self-service site creation feature actually enables the creation of site collections, not subsites. Self-service site creation enables users to create site collections without the assistance of a farm administrator.

In Chapter 3, you learned that you can enable self-service site creation using one of two different interfaces in Central Administration:

  • On the Manage Web Applications page, select a Web Application, and then click Self-Service Site Creation on the ribbon.

  • On the Application Management page, in the Site Collections section, click Configure Self-Service Site Creation.

Despite the fact that one of the links to enable and configure self-service site creation appears in the Site Collections section of Central Administration, it is important to remember that it is scoped to a web application. If self-service site creation is enabled for a web application, users can create new site collections from the top-level site at the root of the web application.

4.2.1.2.1. Create a Site Collection Using Self-Service Site Creation
Create a Site Collection Using Self-Service Site Creation
  1. Open the self-service site creation page for the web application. The URL of the page is http://<Web application URL>/_layouts/scsignup.aspx.

    When you enable self-service site creation, an announcement is added to the Announcements list indicating the availability of self-service site creation. From the website at the root of the web application, click All Site Content, then click Announcements, then click the announcement entitled Self-Service Site Creation. Then click the link in the Body section of the Announcements dialog box to the scsignup.aspx page.


    Tip:

    BEST PRACTICE LINK TO SELF-SERVICE SITE CREATION

    If you enable self-service site creation, add a link to the Self-Service Site Creation page in a location that is easy for users to access.


  2. In the Title box, type the title of the top-level website in the new site collection.

  3. Optionally, in the Description box, type a description for the top-level website.

  4. In the Web Site Address section, if more than one wildcard managed path has been defined, select a managed path from the drop-down list.

    When you create a web application, only one managed path is defined: /sites/. See the Section 4.2.5 section later in this lesson for more information.

  5. In the URL Name box, type the site name, which comprises the final element of the URL for the site collection and top-level website.

  6. In the Template Selection section, select the site definition you want to apply to the top-level site of the new site collection—for example, Team Site on the Collaboration tab.

    Click the Custom tab to create an empty top-level website and apply a template later.


    Note:

    AVAILABLE TEMPLATES ARE BASED ON FEATURES AND CONFIGURATION OF THE SITE

    The available templates will vary based on the features that are enabled and custom templates that have been installed. If you do not see a template that you believe should be available, ensure that appropriate features have been enabled and that the template you desired has been made available. Both of these settings are found on the Site Settings page: feature availability is configured using the Manage Site Features and Site Collection features commands; template availability is configured using the Page Layouts And Site Templates command that appears when a site uses the Publishing Site site definition.


  7. In the Additional Site Collection Administrators box, enter the names of additional site collection administrators. The first-listed user will be assigned as the secondary site collection owner, and will receive email notifications related to quotas and site use confirmation and deletion.

  8. Click Create.

    The Set Up Groups For This Site page opens. See Lesson 2 for more information about creating site groups.

  9. After you have configured site groups, click OK.

4.2.1.3. View Site Collections

If you want to view all site collections in a web application, you can use Central Administration or Windows PowerShell.

4.2.1.3.1. View All Site Collections Using Central Administration
View All Site Collections Using Central Administration

To view all site collections in a web application, use the following procedure:

  1. In the Central Administration Quick Launch, click Application Management.

  2. On the Application Management page, in the Site Collections section, click View All Site Collections.

    The Site Collection List page opens. It displays relative URLs of site collections in the selected web application.

    If you want to change the selected web application, click the Web Application picker, and then click Change Web Application. The Select Web Application dialog box opens. Click the name of a web application.

  3. To display information about a site collection, in the URL column, click the relative URL of the site collection.

    Details are shown on the right side of the page.

View All Site Collections Using Windows PowerShell

The following example shows the use of the Get-SPSite cmdlet to enumerate selected properties of all site collections in a web application:

Get-SPWebApplication "<WebApplicationURL>" | Get-SPSite -Limit ALL | Format-List
-Property URL,ContentDatabase,Owner,SecondaryContact

					  

Where:

  • <WebApplicationURL> is the URL of the web application for which you want to list site collections.

Unfortunately, the SPSite object does not expose all of the properties that you configured when using the New-SPSite cmdlet. For example, the email address of the primary site collection administrator, and the name, description, and template used for the top-level website are not properties of the resulting SPSite object.

Some of these properties are members of the SPWeb object for the top-level website. Others are exposed by the SPSiteAdministration object. SPSiteAdministration is an object that exposes properties of site collections and top-level websites to farm administrators. The following cmdlet exposes site collection properties by using the Get-SPSiteAdministration cmdlet:

Get-SPSiteAdministration |
Select URL,Title,Description,RootWebTemplate,OwnerLoginName,OwnerEmail

In fact, of the properties that you configure when creating a site collection, only the content database name is not immediately available to the Get-SPSiteAdministration cmdlet. In the practice for this lesson, you will use the following cmdlet to report all of the attributes that you use when configuring a new site collection by using Central Administration or the New-SPSite cmdlet:

Get-SPWebApplication "http://teams.contoso.com" | Get-SPSite -Limit ALL |
ForEach {$_ | Get-SPSiteAdministration |
Select URL,Title,Description,RootWebTemplate,OwnerLoginName,OwnerEmail ;
$_ | Select ContentDatabase}

This one-liner retrieves all site collections for a specified web application. It then iterates through each site collection. For each site collection, the associated SPSiteAdministration object returns most of the properties, and the site collection object itself is piped to the Select-Object cmdlet to return the content database name.

4.2.1.4. Delete Site Collections

If a site collection is no longer needed, you might want to delete it. For example, if you created a team site to track progress on a specific project, and the project has ended, you might decide to delete the site collection after a certain amount of time has passed. Your governance plan should guide decisions regarding the life cycle of site collections so that out-of-use content does not remain indefinitely in your SharePoint farm.

When you delete a site collection, you permanently destroy all configuration, user information, and content in the site collection. This includes all site configuration settings; user role and security information; and all websites, lists, and document libraries. It is therefore recommended that you create a backup of a site collection before deleting it. Chapter 11, covers backup procedures. Again, your governance plan should specify whether backups are made of site collections prior to deletion, and the lifespan of such backups.

4.2.1.4.1. Delete a Site Collection Using Central Administration
Delete a Site Collection Using Central Administration
  1. In the Central Administration Quick Launch, click Application Management.

  2. In the Site Collections section, click Delete A Site Collection.

  3. On the Delete Site Collection page, click the Site Collection picker, and then click Change Site Collection.

  4. In the Select Site Collection dialog box, click the Web Application picker, and then click Change Web Application.

    The Select Web Application dialog box opens.

  5. Click the name of the web application that contains the site collection that you want to delete.

    The Select Site Collection dialog box opens. It displays relative URLs of site collections in the web application that you selected.

  6. Click the relative URL of the site collection that you want to delete, and then click OK.

  7. On the Delete Site Collection page, read the Warning section and verify that the site collection information is correct.

  8. Click Delete.

Delete a Site Collection Using Windows PowerShell

The following example shows the use of the Remove-SPSite cmdlet to delete a site collection:

Remove-SPSite -Identity "<URL>" [-GradualDelete]

Where:

  • <URL> is the URL of the site collection you want to delete.

  • The optional -GradualDelete parameter specifies that you use gradual deletion, which reduces the load on the system during the deletion process.


Note:

MORE INFO CREATING AND DELETING SITE COLLECTIONS

The following articles provide further details about creating and deleting site collections:


4.2.2. Configure Site Collections Using Central Administration

After creating the site collection, you should configure site collection settings. The following settings are among those that are configured at the site collection scope:

  • Ownership and administration

  • Storage limits and warnings

  • Locks

  • User and group management

  • Features

4.2.2.1. Site Collection Ownership and Administration

The first setting you should configure is site collection ownership. As you learned in Chapter 2, site collection owners—the primary and secondary site collection administrators of a site collection—receive quota and auto-deletion notices. In addition, they have all the rights associated with site collection administrators.

You can assign site collection owners by using Central Administration, Stsadm, or Windows PowerShell. Central Administration and the Windows PowerShell cmdlet are detailed in the following sections. You can learn more about Stsadm site collection operations on Microsoft TechNet.

4.2.2.1.1. Assign Site Collection Owners Using Central Administration
Assign Site Collection Owners Using Central Administration

To assign site collection owners, perform the following procedure:

  1. In SharePoint 2010 Central Administration Quick Launch, click Application Management.

  2. On the Site Collection Administrators page, in the Site Collection section, confirm that the site collection for which you want to assign ownership is selected.

    If not, click the Site Collection picker, and then click Change Site Collection. Use the Select Site Collection page to select the site collection:

    • Confirm that the Web Application list displays the web application that contains the site collection for which you want to assign ownership.

      If not, click the Site Collection picker, and then click Change Site Collection. On the Select Site Selection page, click the site.

    • In the URL list, click the site collection and then click OK.

  3. In the Primary Site Collection Administrator box, type the name of the primary owner, using the format DOMAIN\username.

  4. In the Secondary Site Collection Administrator box, type the name of the secondary owner, using the format DOMAIN\username.

  5. Click OK.

Assign Site Collection Owners Using Windows PowerShell

The following example shows the use of the Set-SPSite cmdlet to assign the site collection owners:

Set-SPSite -Identity "<SiteCollection>" -OwnerAlias "<DOMAIN\User>"
-SecondaryOwnerAlias "<DOMAIN\User>"

Where:

  • <SiteCollection> is the URL of the site collection to which you want to add a site collection administrator.

  • <DOMAIN\User> is the name of the user whom you want to add as a site collection owner.

  • The -OwnerAlias parameter defines the primary site collection administrator.

  • The -SecondaryOwnerAlias parameter defines the secondary site collection administrator.

After assigning one or two site collection owners, you should determine which additional users require ownership of the site collection. These users should be assigned the site collection administrators role. As you learned in Chapter 2, site collection administrators have full control of all websites in a site collection. They have access to all content in all sites in that site collection, even if they do not have explicit permissions to that content. Site collection administrators also can configure all settings of the site collection.

Assign Site Collection Administrators Using Central Administration

To assign site collection administrators, perform the following procedure:

  1. At the top-level site of a site collection, click Site Actions, and then click Site Settings.

  2. In the Users And Permissions section, click Site Collection Administrators.

  3. Add or remove users from the semicolon-delimited list of site collection administrators.

Any site collection administrator can change the list of site collection administrators. There can be one or more site collection administrators. The primary and secondary owners of the site collection are automatically site collection administrators, and there is no way to segregate owners (which have both site collection administration and contact roles) from site collection administrators. If a site collection has only one or two site collection administrators, those same users are the primary and secondary owners of the site collection as well.

Assign Site Collection Administrators Using Windows PowerShell

Use the Set-SPUser cmdlet’s -IsSiteCollectionAdmin parameter to assign the site collection administrator role to a user in a site collection. Use the following syntax:

Set-SPUser -Identity "<DOMAIN\Username>" -IsSiteCollectionAdmin

Where:

  • <DOMAIN\Username> is the identity of the user account. The account must have been added previously to the site collection. Use the New-SPUser cmdlet to add a user to a site collection.

When you use Windows PowerShell to add a second site collection administrator, the user is not automatically made a site collection owner.


Note:

MORE INFO ASSIGNING SITE COLLECTION ADMINISTRATORS

You can learn more about managing site collection administrators in the TechNet article, “Add or remove site collection Administrators (SharePoint Server 2010)” at http://go.microsoft.com/fwlink/?LinkID=192707.


4.2.2.2. Quotas

One of the important site collection settings is the quota, which specifies the storage limit values for the maximum amount of data that can be stored in a site collection. Data includes the following:

  • Documents stored in document libraries

  • List items

  • Attachments

  • Previous versions of documents, items, and attachments, if versioning is enabled

  • Configuration

  • Content in the Recycle Bins

When you configure a quota for a site collection, it applies to the collected data within all sites in the site collection. Quotas define the following:

  • A storage limit, in megabytes. If you enable and define a storage limit, when the storage limit is reached, users are prevented from adding data to the site, and an email is sent to the site collection owners—the primary and secondary site collection administrators.

  • A storage warning level, in megabytes. When site collection storage reaches the storage warning level, an email message is sent to site collection owners, but users can continue to add data to the site. The warning enables owners to proactively address the problem by deleting site content or increasing the storage limit. The storage warning level is optional, but if it is defined it must be a value less than the storage limit.

Quotas also define the resource utilization limits for Sandboxed Solutions. Sandboxed Solutions are discussed in Chapter 10.

4.2.2.2.1. Configure a Quota for a Site Collection Using Central Administration
Configure a Quota for a Site Collection Using Central Administration

To configure a quota for a site collection, perform the following procedure:

  1. In Central Administration, click Application Management.

  2. On the Application Management page, in the Site Collections section, click Configure Quotas And Locks.

    The Site Collection Quotas And Locks page opens.

  3. If you want to change the selected site collection, in the Site Collection section, in the Site Collection picker, click Change Site Collection. Use the Select Site Collection page to select a site collection.

  4. In the Site Quota Information section, in the Current Quota Template list, select Individual Quota.

  5. Select the Limit Site Storage To A Maximum Of check box, and then type the maximum value in megabytes.

  6. If you want to send site storage notification email messages to the site collection owners, select the Send Warning E-Mail When Site Storage Reaches check box, and then type the warning value in megabytes.

Configure a Quota for a Site Collection Using Windows PowerShell

The following example shows the use of the Set-SPSite cmdlet to configure a quota:

Set-SPSite -Identity "<Site>" -MaxSize <StorageLimit> -WarningLevel <WarningLevel>

					  

Where:

  • <Site> is the URL of the site collection whose storage limits you want to change.

  • <StorageLimit> is the new storage limit for the site collection, in megabytes.

  • <WarningLevel> is the new warning level for the site collection, in megabytes.

4.2.2.3. Quota Templates

You can imagine that it can become burdensome to configure the storage limits for each individual site collection—for example, configuring each department in your organization. To facilitate management of storage limits, you can create quota templates. A quota template specifies a storage limit and warning level. You can then apply a quota template to a site collection, and the template’s limits are applied to the site collection. For example, you could create a single template for departmental team sites, specifying a quota of 500 MB. When you create a site collection for a departmental team site, you simply apply the quota template and the settings in the quota are applied to the site collection.

4.2.2.3.1. Create, Modify, or Delete a Quota Template
Create, Modify, or Delete a Quota Template

To create, modify, or delete a quota template, perform the following procedure:

  1. In the Central Administration Quick Launch, click Application Management.

  2. On the Application Management page, in the Site Collections section, click Specify Quota Templates to open the Quota Templates page, shown in Figure 4-2.

    You can create, modify, or delete a quota template from the Quota Templates page.

  3. Perform one of the following steps:

    • If you want to delete a quota template, select the template in the Template To Modify list, and then click Delete. A confirmation prompt opens. Click OK. The template is deleted. Skip to step 6.

    • If you want to modify a quota template, select the template in the Template To Modify list.

    • If you want to create a new quota template, click Create A New Quota Template and then, in the New Template Name box, type a name for a new quota template.

    Figure 4-2. Quota Templates page

  4. In the Storage Limit Values section, specify the values that you want to apply to the template.

    • If you want to modify the amount of data that can be stored in the database, select the Limit Site Storage To A Maximum Of check box, and type the new storage limit, in megabytes, in the text box.

    • If you want an email message to be sent to the site collection administrator when a storage threshold is reached, select the Send Warning E-Mail When Site Collection Storage Reaches check box, and then type the threshold, in megabytes, in the box.

  5. In the Sandboxed Solutions With Code Limits section, set the values for a template for Sandboxed Solutions.

    • If you want to limit the resource usage of Sandboxed Solutions in the site collection, select the Limit Maximum Usage Per Day To check box, and then type the daily resource usage limit, in points, in the text box.

    • If you want an email message to be sent to the site collection administrator when a resource usage threshold is reached, select the Send Warning E-Mail When Usage Per Day Reaches check box, and then type the daily resource usage warning limit, in points, in the box.


      Note:

      A POINT IS A RELATIVE MEASUREMENT

      A point is a relative measurement of resource usage, such as CPU cycle, memory, or page faults. Points enable comparisons between measurements of resource usage that could not be compared otherwise.


      See Chapter 10 for more detail about Sandboxed Solutions.

  6. Click OK.

After you create a quota template, it can be applied to one or more site collections. When a quota template is applied to a site collection, the quota template’s storage limit and storage warning level properties are applied to the site collection.

Apply a Quota Template to a Site Collection

To apply a quota template to a site collection, perform the following procedure:

  1. In the Central Administration Quick Launch, click Application Management.

  2. On the Application Management page, in the Site Collections section, click Configure Quotas And Locks to open the page shown in Figure 4-3.

    Figure 4-3. Site Collection Quotas And Locks page

  3. If you want to change the selected site collection, in the Site Collection section, click the Site Collection picker, and then click Change Site Collection. Use the Select Site Collection page to select a site collection.

  4. In the Site Quota Information section, click the Current Quota Template list, and then select the new quota template to apply.

  5. Click OK.

It is important to understand the architecture of quotas. Quota templates are defined at the farm level. When a quota template is applied to one or more site collections, the properties of the template are applied to the site collection.

If you update a quota template, the new settings apply to any new site collections to which the quota is applied. However, when you update a quota template, the change does not apply to existing site collections. This is not obvious in Central Administration—if you open the Site Collection Quotas And Locks page, you will see the new settings of the template, but those settings are not actually applied until you click OK.

Alternately, you can use Windows PowerShell’s Set-SPSite cmdlet. The -QuotaTemplate parameter can be used to reapply the template and thereby to apply its new settings.


Note:

MORE INFO PLANNING BROWSER SUPPORT

The following article provides additional details regarding storage limits and quotas: “Manage site collection storage limits (SharePoint Server 2010)” at http://go.microsoft.com/fwlink/?LinkID=192708.


Quick Check

  • When you apply a quota template, SharePoint limits the size of which of the following objects: Web application, site collection, or site?

Quick Check Answer

  • Quotas apply to a site collection.


4.2.2.4. Site Collection Locks

You can apply locks to prevent users from accessing or modifying content in a site collection. Locks are particularly useful when you want to prevent changes to content without changing the permissions on the content itself. Table 4-1 describes the locking options that are available in Microsoft SharePoint Server 2010.

Table 4-1. Site Collection Locks
OPTIONDESCRIPTION
Not LockedUnlocks the site collection and makes it available to users.
Adding Content PreventedPrevents users from adding new content to the site collection. Updates and deletions are still allowed.
Read-only (Blocks Additions, Updates, And Deletions)Prevents users from adding, updating, or deleting content.
No AccessPrevents access to content completely. Users who attempt to access the site receive an access-denied message.


4.2.2.4.1. Lock or Unlock a Site Collection Using Central Administration
Lock or Unlock a Site Collection Using Central Administration

To lock or unlock a site collection, perform the following steps:

  1. In Central Administration, click Application Management.

  2. On the Application Management page, in the Site Collections section, click Configure Quotas And Locks to open the Site Collection Quotas And Locks page.

  3. If you want to change the selected site collection, in the Site Collection section, in the Site Collection picker, click Change Site Collection. Use the Select Site Collection page to select a site collection.

  4. On the Site Collection Quotas And Locks page, in the Site Lock Information section, select one of the following options:

    • Not Locked Unlocks the site collection and makes it available to users.

    • Adding Content Prevented Prevents users from adding new content to the site collection. Updates and deletions are still allowed.

    • Read-Only (Blocks Additions, Updates, And Deletions) Prevents users from adding, updating, or deleting content.

    • No Access Prevents access to content completely. Users who attempt to access the site receive an access-denied message.

  5. If you select Adding Content Prevented, Read-Only (Blocks Additions, Updates, And Deletions), or No Access, type a reason for the lock in the Additional Lock Information box.

  6. Click OK.

Lock or Unlock a Site Collection Using Windows PowerShell

The following example shows the use of the Set-SPSite cmdlet with the -LockState parameter to lock or unlock a site.

Set-SPSite -Identity "<SiteCollection>" -LockState "<State>"

Where:

  • <SiteCollection> is the URL of the site collection that you want to lock or unlock.

  • <State> is one of the following values:

    • Unlock Unlocks the site collection and makes it available to users.

    • NoAdditions Prevents users from adding new content to the site collection. Updates and deletions are still allowed.

    • ReadOnly Prevents users from adding, updating, or deleting content.

    • NoAccess Prevents access to content completely. Users who attempt to access the site receive an access-denied message.

4.2.2.5. User and Group Management

In Lesson 2, you will learn to manage users and groups in SharePoint 2010. The users and groups that are allowed to access content within a site collection are defined at the site collection itself. The permissions assigned to a user and group are configured at the site, list, library, folder, item, or document, but the user list and the groups list is a property of the site collection. See Lesson 2 for more information about user and group management.

4.2.2.6. Features

Site collections also impose functional boundaries. Features can be activated or deactivated at the site collection level. A feature must be enabled at the site collection level before websites in the site collection can take advantage of the feature. If a feature is deactivated at the site collection scope, it cannot be enabled at the website scope. You will learn more about features in Chapter 10.

4.2.2.7. Other Settings in the Site Collections Section of Central Administration

The Site Collections settings in Central Administration tend to cause confusion for several reasons. First, site collection settings do not use the new user interface featuring the ribbon. With a ribbon, you can select an object—such as a web application—and then configure a setting. For site collection settings, you select the setting first, then you must select the web application and then the site collection for which you want to configure the setting, and only then can you configure the setting itself.

Second, two settings listed in the Site Collections section of the Application Management page of Central Administration are not scoped to site collections at all: Self-Service Site Creation and Site Use Confirmation And Deletion. Although both of these settings affect site collections, they are scoped to web applications and affect all site collections in a web application. Self-Service Site Creation can also be configured using the Manage Web Applications page of Central Administration and using the Security page of Central Administration. Site Use Confirmation And Deletion can only be configured from the Site Collections section of the Application Management page.

The configuration of self-service site creation is described in Chapter 3, and the creation of sites using self-service site creation is detailed earlier in this lesson. Site Use Confirmation And Deletion is also covered in Chapter 3.

4.2.3. Configure Site Collections Using Site Settings

After you create a site collection and top-level site, you can configure some administrative settings from Central Administration, as you learned earlier in this lesson. You can configure additional settings on the Site Settings page of the top-level website.

4.2.3.1. Configure Site Collection Settings Using the Site Settings Page
4.2.3.1.1. Configure Site Collection Settings Using the Site Settings Page
Configure Site Collection Settings Using the Site Settings Page

To configure site collection settings by using the Site Settings page, perform one of the following two procedures:

  • From the top-level website of a site collection, click Site Actions, and then click Site Settings.

  • From a subsite in a site collection, click Site Actions, then click Site Settings, and then, in the Site Collection Settings section of the Site Settings page, click Top-Level Site Settings.

The Site Settings page of the top-level site, shown in Figure 4-4, provides links to commands that affect both the top-level website and the site collection itself. The commands that appear can vary based on the version of SharePoint that is installed. The links are security-trimmed. If you are a site collection owner or a user with Full Control permission to a site, but you are not a site collection administrator, you will see commands that configure the top-level website settings, shown on the right side of Figure 4-4. If you are a site collection administrator, you will see additional commands that configure the site collection, shown on the left side of Figure 4-4.

Within the settings that can be configured for the site collection and top-level website, additional options appear to a site collection administrator that do not appear for a site owner. For example, a site owner can enable or disable RSS feeds for a site. (By default, RSS feeds are enabled.) A site collection administrator can disable RSS feeds for the entire site collection. If feeds are disabled for the site collection, they are disabled for every site in the site collection and site owners cannot enable feeds.

Many of these settings will be described later in this Training Kit.

Figure 4-4. The Site Settings page, as seen by a site collection administrator (top) and a user with Full Control permission of a site (bottom)


4.2.4. Multiple Sites vs. Multiple Site Collections

A site collection can contain one or more websites. Below the top-level site, you can create additional sites, referred to as subsites, subwebs, or child sites.

Figure 4-5 shows subsites in the teams site collection for HR, Marketing, Finance, and Engineering. The URL for HR would be http://teams.contoso.com/HR. The figure also shows subsites in the clients site collection for Litware and Fabrikam. The URL for Litware would be http://clients.contoso.com/Litware. The site hierarchy can be even deeper, but be aware of the 260-character URL length limit. In Figure 4-5, each web application contains a single site collection in a single content database.

Figure 4-5. Subsites


In this section, you will explore some of the factors that determine whether this design is appropriate based on your governance requirements.

4.2.4.1. Site Collections and Governance Controls

As you’ve learned in this lesson, a number of governance controls, including content ownership, quota configuration, locks, user and group management, feature availability, and settings such as RSS feeds are configured at and scoped to a site collection. Governance objectives often drive organizations to create multiple site collections that configure unique properties for each site collection.

For example, distinct users might have ownership of the Finance and Engineering websites—an administrator of Engineering might not have full control of content on the Finance website. Additionally, because site collection owners and administrators are defined at the site collection level, a user who requires ownership of Finance—including the ability to configure all conceivable settings—must be made a site collection administrator of the intranet site collection itself.

In the teams application, different quotas might be assigned to HR and to Engineering, which works with large documents and projects. Each of these governance controls—quotas and self-service site creation, respectively—require separate site collections.

As another example, users and groups in the clients site collection are part of the site collection http://clients.contoso.com. Any user management activities—for example, adding users to groups—will take place at the site collection, at which point users and groups representing all clients will be visible. It is not possible to segregate the user and group list, because it is a part of the site collection, not the subsites.

For example, Contoso has two clients: Litware and Fabrikam. If the client project sites Litware and Fabrikam are created as subsites of the root site collection, http://clients.contoso.com, their URLs will be http://clients.contoso.com/Litware and http://clients.contoso.com/Fabrikam, respectively. If a user needs access to the Litware site, the user is added to the site collection, as is a user who needs access to the Fabrikam site. If a group is defined for permissions to content in the Fabrikam site, the group is defined in the groups list of the site collection, and then the group is given permission to content in the Fabrikam site.

Because the list of users and the list of groups is defined at the site collection level, users and groups from both clients are visible, and it is possible for a user from Litware to be accidentally added to the Fabrikam group. Client users and groups are not separated, because all users and groups belong to the site collection itself. To separate users and groups, you must have each client in its own site collection.

4.2.4.2. Site Collections and Content Databases

Out-of-box data recovery (backup and restore) tools require that you back up and restore a content database. This statement is somewhat oversimplified, and in Chapter 11, you will learn about backup and restore. But in the end, at some level, you are working with an entire content database during backup and at some phase of the recovery process.

The time required to back up or restore a content database should be within the service level defined by your SharePoint governance plan. A large content database can take so long to back up or restore that you might fail to achieve your service level objective.

Because of this relationship between content databases and storage management, governance and service level agreements (SLAs) often drive an organization to create multiple site collections so that site collections can be distributed across content databases. The only way to store sites in separate content databases is to put sites in separate site collections.

For example, if the Finance and Engineering websites are in a single site collection, they are therefore in a single content database. If your SLA with Finance mandates a backup every two hours, but your SLA with Engineering requires a nightly backup, you must also back up the Engineering website every two hours because backup is performed at the site collection level. If the Engineering website is large, this could impact the ability to complete a backup within the specified window. It is therefore likely that you will put each website in a separate content database so that you can back up and restore each database according to your SLA. For each website to be in a separate database, it must be in a separate site collection.

4.2.4.3. Multiple Site Collections and Content Databases

At this point in the discussion, you should understand that creating your entire SharePoint logical structure as subsites within a single site collection is unlikely to serve you effectively. You are likely to require multiple site collections to support your governance and storage management requirements.

In fact, it could be argued that you should make each departmental site on the Contoso intranet a separate site collection in a separate content database to provide maximum granularity for configuring governance settings. Additionally, from a storage management perspective, you could achieve maximum granularity by hosting each department’s site collection in a separate content database.

Now that you understand the reasons for supporting multiple site collections and multiple content databases, you are ready to learn how to build a more governable SharePoint intranet. Figure 4-6 illustrates an intranet site in which each department’s website is a top-level website in a department-specific site collection, and each department’s site collection is in a dedicated content database.

In the next sections, you will discover how to create site collections in separate content databases to implement designs that are closer to that shown in Figure 4-6. At the end of the lesson, we will revisit design considerations in greater depth.

Figure 4-6. The teams.contoso.com web application with each department in a separate site collection and content database


4.2.5. Managed Paths

To create a new site collection within a web application, you need a managed path at which to create the site collection.

A managed path is a portion of the URI namespace where the site collections exist. A managed path is not directly mapped to content within the web application. Instead, it is used by SharePoint as a namespace (path) node where site collections can be created. The managed path is a node in the URI namespace at which a site collection begins.

An explicit inclusion path defines a specific managed path that can be used to create only a single site collection, at the exact URL specified. When you create a web application, SharePoint defines an explicit inclusion path named root, which is at the root of the web application (/). For example, the root path for the teams web application shown in Figure 4-6 is http://teams.contoso.com/ and a single site collection can be created at that exact URL.

A wildcard inclusion path such as http://teams.contoso.com/sites/ indicates that child URLs of the path are managed paths at which site collections are hosted. So, for example, http://teams.contoso.com/sites/MyTeam is a managed path at which a site collection can be created. A wildcard inclusion path such as sites/ allows for unlimited number of site collections to be created directly under the provided path.

It is important to note that a site collection (and therefore a website) cannot be created at the URL of a wildcard inclusion path. For example, you cannot create a site collection or any content at the address http://teams.contoso.com/sites.

Two paths are created by default when you create a new web application: the explicit path at the root and a wildcard inclusion path, sites/. However, you can define explicit or wildcard inclusion paths with other descriptive names such as depts (for departments), teams, clients, or projects. In Figure 4-6, the departmental sites for the HR and Engineering departments are site collections under a wildcard inclusion path, depts.

Managed paths allow a SharePoint server to receive a request in the form of a URI and to determine which part of the URI corresponds to a site collection by looking at the list of managed paths for a given web application. SharePoint can then identify the content database that hosts the site collection, and then can retrieve the requested content based on the remaining portion of the URI.

This means that SharePoint has to compare each request to each defined path. So Microsoft supports a maximum of 20 path definitions per web application. A wildcard inclusion path is counted as one path definition, although technically numerous managed paths can be immediately beneath it in the URI namespace.

Quick Check

  • What is the difference between an explicit inclusion managed path and a wildcard inclusion managed path?

Quick Check Answer

  • You can create one site collection at the URL of an explicit inclusion managed path. If you add a wildcard inclusion managed path, such as /depts, you can create multiple site collections below the URL of the managed path, such as /depts/Finance and depts/Sales.


4.2.5.1. Add Managed Paths for a Web Application Using Central Administration
4.2.5.1.1. Add Managed Paths for a Web Application Using Central Administration
Add Managed Paths for a Web Application Using Central Administration
  1. In the Central Administration Quick Launch, click Application Management.

  2. On the Application Management page, click Manage Web Applications.

  3. Click the web application for which you want to manage paths.

  4. On the ribbon, click Managed Paths.

  5. On the Define Managed Paths page, in the Add A New Path section, type the path you want to include.

  6. Click Check URL to confirm the path name.

  7. Use the Type drop-down menu to identify the path as either Wildcard inclusion or Explicit inclusion.

    • The Wildcard inclusion type includes all URLs that are immediately subordinate to the specified URL.

    • The Explicit inclusion type includes only the URL that is indicated by the specified path.

  8. Click Add Path.

  9. When you have finished adding paths, click OK.

Remove Managed Paths for a Web Application Using Central Administration
  1. In the Central Administration Quick Launch, click Application Management.

  2. On the Application Management page, click Manage Web Applications.

  3. Click the web application that you want to manage paths.

  4. On the ribbon, click Managed Paths.

  5. On the Define Managed Paths page, in the Included Paths section, select the check box next to the path that you want to remove.

  6. Click Delete Selected Paths.


    Warning:

    IMPORTANT DELETION IS IMMEDIATE

    You will have no additional opportunity to confirm this deletion.


  7. When you have finished removing paths, click OK.

Add a Managed Path Using Windows PowerShell

The following example shows the use of the New-SPManagedPath cmdlet to add a managed path to a web application:

New-SPManagedPath [-RelativeURL] "</RelativeURL>" -WebApplication <WebApplication>

					  

Where:

  • </RelativeURL> is the relative URL for the new managed path. The type must be a valid partial URL, such as site or sites/teams/.

  • <WebApplication> is the URL of the web application to which the managed path will be added.

Remove a Managed Path by Using Windows PowerShell

The following example shows the use of the Remove-SPManagedPath cmdlet to remove a managed path from a web application:

Remove-SPManagedPath [-Identity] <ManagedPathName> -WebApplication <WebApplication>

					  

Where:

  • <ManagedPathName> is the name of the managed path to delete.

  • <WebApplication> is the URL of the web application that hosts the managed path to delete.


Note:

MORE INFO MANAGED PATHS

The following articles provide additional details regarding managed paths:


4.2.6. Content Databases

When you create a web application, you specify the name of the initial content database. You can later create additional content databases for the web application.

4.2.6.1. Add a Content Database Using Central Administration
4.2.6.1.1. Add a Content Database Using Central Administration
Add a Content Database Using Central Administration
  1. In the Central Administration Quick Launch, click Application Management.

  2. In the Databases section, click Manage Content Databases.

  3. On the Manage Content Databases page, in the Web Application section, ensure that you are focused on the web application in which you want to create a site collection.

    If necessary, click the web application picker, and then click Change Web Application. Click the correct web application.

  4. Click Add A Content Database.

  5. In the Database Name box, type a name for the database, such as SharePoint_Content_Intranet_IT.

    Use the naming standards of your organization to determine the name.

  6. Click OK.

Add a Content Database by Using Windows PowerShell

The following example shows the use of the New-SPContentDatabase cmdlet to create a new content database:

New-SPContentDatabase -Name <ContentDbName> -WebApplication <WebApplicationName>

					  

Where:

  • <ContentDbName> is the name of the content database that you want to create.

  • <WebApplicationName> is the name of the web application to which the new database is attached.


Note:

MORE INFO CREATING CONTENT DATABASES

The following article provides additional details regarding creating content databases: “Add a content database (SharePoint Server 2010)” at http://go.microsoft.com/fwlink/?LinkID=192712.


4.2.6.2. Add a Site Collection to a Content Databases

After you create a content database, you can create site collections in that content database.

When you use Central Administration to create a site collection, Central Administration automatically determines which content database will contain the site collection. You cannot easily specify a content database in Central Administration.

Instead, each content database is evaluated to determine which content database has the most available sites, based on the content database’s Maximum Sites property and the current number of sites in the content database. The content database with the most available sites is used to host a new site collection. It’s important to mention that the size of the content database is not taken into consideration. In the event that more than one content database has the same number of available sites, the content database with the lowest GUID is selected as a tiebreaker.

As you can see, the lack of fine-grained control in Central Administration can be problematic when you are trying to manage the association of site collections to content databases.

You can use the -ContentDatabase parameter of the New-SPSite cmdlet to create a site collection in a specific content database.

4.2.6.3. Move a Site Collection Between Content Databases

You cannot move site collections between content databases by using Central Administration. However, you can use Windows PowerShell to move site collections between content databases and thereby to optimize storage management for your site collections.

The following example shows the use of the Move-SPSite cmdlet to move a site collection between content databases:

Move-SPSite <http://ServerName/Sites/SiteName> -DestinationDatabase
<DestinationContentDb>

Where:

  • <http://ServerName/Sites/SiteName> is the name of the site collection.

  • <DestinationContentDb> is the name of the destination content database.

4.2.7. Designing Sites, Site Collections, and Content Databases

A simple view of the logical infrastructure of a typical intranet or collaboration web application was shown earlier in Figure 4-6. At the root of the web application is a site collection with a top-level site that serves as the home page, and may contain general content that applies across divisions.

Under a managed path, each division, department, or team gets a unique site collection. The URL to a divisional site is Web application \ [managed path \] site, for example, http://intranet.contoso.com/depts./HR.

The division’s site collection scopes the ownership, user and group definitions, quotas, features, and other configurations for the site. You will typically need far more site collections than you would anticipate, because governance designs typically require more than one set of configurations at the site collection level.

Optionally, you can put each division’s site collection in a dedicated content database to manage storage, backup, and restore. Keep in mind, however, that there are performance-related scalability guidelines that might prevent you from putting every division in a separate site collection in particularly large or complex implementations.

Figure 4-6 illustrates a design approach that is diametrically opposite to the single site collection, multiple site design shown in Figure 4-5. Neither design is appropriate for every organization, or even every collaboration scenario within an organization. When designing your sites and site collections, governance requirements such as security (ownership) and storage management (quotas and locks) will determine the balance between sites and site collections. When designing a strategy for content databases, consider your service level objectives. Include the recovery time objective (how quickly your deleted or corrupted content is brought back online) and your recovery point objective (how far back in time your historical backups are maintained).

For performance reasons you must also consider the following scalability boundaries. In fact, several scalability guidelines apply to SharePoint Server 2010:

  • 300 content databases per web application are supported.

    Additionally, the RAM and performance of your SQL Server limits the total number of content databases that should be hosted on that server.

  • 200 GB per content database are supported.

    Content database sizes up to 1 terabyte are supported only for large, single-site repositories and archives with non-collaborative I/O and usage patterns, such as Records Centers. Larger database sizes are supported for these scenarios because their I/O patterns and typical data structure formats have been designed for, and tested at, larger scales.

  • 100 GB per site collection are supported. If a content database contains only one site collection, the site collection can be up to 200 GB.

  • 250,000 Web sites per site collection are supported.

  • Up to 2,000 subsites per site view.


Note:

MORE INFO SOFTWARE BOUNDARIES

The following article provides additional details regarding software boundaries: “SharePoint Server 2010 Capacity Management: Software Boundaries and Limits” at http://go.microsoft.com/fwlink/?LinkID=192711.


As you can see, determining the optimal design for your SharePoint farm, web applications, site collections, and content databases is both an art and a science.

4.2.7.1. Practice Manage Site Collections and Content Databases
4.2.7.1.1. Practice Manage Site Collections and Content Databases

Practices are designed to guide you through important procedures. The instructions in the Training Kit are high-level instructions that will challenge you to think carefully and to apply the procedures that are covered in this lesson, and elsewhere in the Training Kit. If you need assistance, consult the detailed, step-by-step instructions in the Practice Answers on the companion media.

In this practice, you will create a web application similar to the one shown in Figure 4-6. You will use Central Administration and Windows PowerShell to create and configure site collections and content databases.

4.2.7.2. Prepare for the Practice

Before you perform this practice, you must ensure that your lab environment has been built according to the instructions found in the Introduction to this Training Kit.

  1. Apply the snapshot CHAPTER 01 to CONTOSO-DC.

  2. Apply the snapshot CHAPTER 01 to SP2010-WFE1.

  3. Start CONTOSO-DC.

    Wait for the virtual machine to complete startup, at which time the Press Ctrl+Alt+Del prompt appears.

  4. Start SP2010-WFE1.

EXERCISE 1 Create a Web Application

In this exercise, you create a new web application for departments, teams, and projects.

  1. Log on to SP2010-WFE1 as CONTOSO\SP_Admin with the password Pa$$w0rd.

  2. Start Command Prompt.

  3. Use Dnscmd.exe to create a new host (A) record on the DNS server (contoso-dc.contoso.com) for teams.contoso.com that resolves to the IP address 10.0.0.21. Then close Command Prompt.

  4. Start SharePoint 2010 Management Shell using the Run As Administrator option.

  5. Use the New-SPWebApplication cmdlet to create a web application for departments, teams, and projects. Use the following specifications and guidance:

    • Name: Contoso Teams

    • Port: 80

    • Host header: http://teams.contoso.com

    • URL: http://teams.contoso.com:80

    • Application pool: SharePoint Web Applications

    • Content database name: SharePoint_Content_Teams

EXERCISE 2 Create a Site Collection Using Central Administration

In this exercise, you use Central Administration to create a site collection at the root of the new web application.

  1. Open Central Administration.

  2. Create a site collection. Use the following specifications and guidance:

    • Web application: http://teams.contoso.com

    • Title: Contoso Departments, Teams, and Projects

    • Description: Collaboration sites for Contoso departments, teams, and projects

    • URL: http://teams.contoso.com/

    • Template: Team Site

    • Primary site collection administrator: CONTOSO\SP_Admin

EXERCISE 3 Configure Managed Paths

In this exercise, you add a wildcard inclusion path, depts, for department site collections in the teams.contoso.com web application. You also remove the default wildcard inclusion path, sites.

  • In Central Administration, configure the managed paths for teams.contoso.com. Remove the default wildcard inclusion path, sites, and add a wildcard inclusion path, depts.

EXERCISE 4 Create a Site Collection by Using Self-Service Site Creation

In this exercise, you enable self-service site creation for the web application, and then use the feature to create a new site collection.

  1. In Central Administration, enable self-service site creation for the teams.contoso.com web application. Specify that a secondary site collection administrator is required.

  2. In a new tab of Internet Explorer, browse to http://teams.contoso.com. Open the announcement that indicates that self-service site creation is enabled. Copy the link to the self-service site creation page, and then paste the address into the address bar.

  3. On the self-service site creation page, create a new site collection. Use the following specifications and guidance:

    • Title box: Information Technology

    • Description: Information Technology department team site

    • URL: http://teams.contoso.com/depts/IT

    • Template: Team Site

    • Secondary site collection administrator: CONTOSO\AprilM

  4. When the Set Up Groups For This Site page opens, accept the defaults.

EXERCISE 5 Create a Content Database Using Central Administration

In this exercise, you use Central Administration to create a content database for the IT departmental team site.

  • Switch to Central Administration, and then create a content database. Use the following specifications and guidance:

    • Web application: http://teams.contoso.com

    • Database server: SP2010-WFE1.contoso.com

    • Database name: SharePoint_Content_Teams_IT

EXERCISE 6 Move a Site Collection to a Different Content Database

In this exercise, you use Windows PowerShell to move a site collection to another content database.

  1. In Central Administration, on the Manage Content Databases page, observe that the new content database contains no sites.

  2. Switch to SharePoint 2010 Management Shell, and then use the Move-SPSite cmdlet to move the http://teams.contoso.com/depts/IT site collection to the SharePoint_ Content_Teams_IT content database.

    An error appears.

    Question: What is the cause of the error?

  3. Solve the problem that caused the error in the previous step.

    Tip: You must run another instance of SharePoint 2010 Management Shell as CONTOSO\Administrator with the password Pa$$w0rd to use the Add-SPShellAdmin cmdlet.

    When you have solved the problem, close the new instance of SharePoint 2010 Management Shell that you opened, and then switch back to the instance of SharePoint 2010 Management Shell that you used in step 1.

  4. Use the Move-SPSite cmdlet to move http://teams.contoso.com/depts/IT site collection to the SharePoint_Content_Teams_IT content database. Add the parameter that will suppress confirmation prompts.

    Be sure to read the informational message that is returned by the cmdlet and follow the instructions that it provides.

  5. Switch to Internet Explorer, and then refresh the pages shown in both tabs.

    Because IIS has been reset, it will take a few minutes for the sites to be compiled, cached, and loaded.

  6. In Central Administration, on the Manage Content Databases page, observe that the new content database now contains one site.

EXERCISE 7 Create Site Collections in Specific Content Databases Using Windows PowerShell

In this exercise, you create content databases and site collections for several departments in the teams.contoso.com web application.

  1. Switch to SharePoint 2010 Management Shell.

  2. Use the New-SPContentDatabase cmdlet to create a content database named SharePoint_Content_Teams_HR for the teams.contoso.com web application.

  3. Use the New-SPSite cmdlet to create a site collection. Use the following specifications and guidance:

    • URL: http://teams.contoso.com/depts/HR

    • Content database: SharePoint_Content_Teams_HR

    • Name: HR

    • Description: HR department team site

    • Template: default Team Site template

    • Primary site collection administrator: CONTOSO\SP_Admin

    • Primary site collection administrator email address: SP_Admin@contoso.com

  4. In Notepad, create a Windows PowerShell script that uses variables and iteration to create unique content databases and site collections for the following three departments: Finance, Marketing, and Sales. Use the specifications and guidance provided in the previous step, modified to be specific to each department. Save the script to your desktop with the name CreateDeptSites.ps1.

  5. Run the script.

EXERCISE 8 View All Site Collections

In this exercise, you use Central Administration and Windows PowerShell to view selected attributes of all site collections.

  1. In the Central Administration, view the details of each site collection in the teams.contoso.com web application.

  2. In SharePoint 2010 Management Shell, type the following command and then press Enter:

    Get-SPWebApplication "http://teams.contoso.com" | Get-SPSite -Limit ALL |
    ForEach {$_ | Get-SPSiteAdministration |
    Select URL,Title,Description,RootWebTemplate,OwnerLoginName,OwnerEmail ;
    $_ | Select ContentDatabase}

  3. Compare the output of the command to the following results:

    Url             : http://teams.contoso.com
    Title           : Contoso Departments, Teams, and Projects
    Description     : Collaboration sites for Contoso departments, teams, and projects
    RootWebTemplate : STS
    OwnerLoginName  : CONTOSO\sp_admin
    OwnerEmail      : SP_Admin@contoso.com
    
    ContentDatabase : SPContentDatabase Name=SharePoint_Content_Teams
    
    Url             : http://teams.contoso.com/depts/Finance
    Title           : Finance
    Description     : Finance department team site
    RootWebTemplate : STS
    OwnerLoginName  : CONTOSO\sp_admin
    OwnerEmail      : SP_Admin@contoso.com
    
    ContentDatabase : SPContentDatabase Name=SharePoint_Content_Teams_Finance
    
    Url             : http://teams.contoso.com/depts/IT
    Title           : Information Technology
    Description     : Information Technology department team site
    RootWebTemplate : STS
    OwnerLoginName  : CONTOSO\sp_admin
    OwnerEmail      : SP_Admin@contoso.com
    
    ContentDatabase : SPContentDatabase Name=SharePoint_Content_Teams_IT
    
    Url             : http://teams.contoso.com/depts/Marketing
    Title           : Marketing
    Description     : Marketing department team site
    RootWebTemplate : STS
    OwnerLoginName  : CONTOSO\sp_admin
    OwnerEmail      : SP_Admin@contoso.com
    
    ContentDatabase : SPContentDatabase Name=SharePoint_Content_Teams_Marketing
    
    Url             : http://teams.contoso.com/depts/Sales
    Title           : Sales
    Description     : Sales department team site
    RootWebTemplate : STS
    OwnerLoginName  : CONTOSO\sp_admin
    OwnerEmail      : SP_Admin@contoso.com
    
    ContentDatabase : SPContentDatabase Name=SharePoint_Content_Teams_Sales
    
    					  

  4. If the structure or details of the teams.contoso.com web application in your farm are different than what is shown in the preceding code, make appropriate changes to your farm. Check the work that you performed in previous exercises. If necessary, review the Practice Answers to verify that you performed all steps accurately, and that your CreateDeptSites.ps1 script is correct.

4.2.8. Lesson Summary

  • Site collections contain a top-level website and zero or more subsites.

  • The content and configuration of a site collection is stored in one content database. A content database can host zero or more site collections for a single web application.

  • Site collection settings include ownership and administration (the site collection administrators), storage limits (quotas), site collection locks, users and groups, and feature availability.

  • Settings of web applications, including self-service site creation and site use confirmation and deletion, affect all site collections within a web application.

  • By using Windows PowerShell, you can create a site collection in a specific content database, and you can move a site collection between content databases.

  • A managed path is a node in the URI namespace at which a site collection exists. SharePoint uses managed paths to parse a request so that SharePoint can determine which site collection contains the requested content, and thereby determine which content database must be accessed to retrieve the content.

  • Each web application defines explicit and wildcard inclusion paths. An explicit inclusion path is a URL that can be a managed path. A wildcard inclusion path specifies a path under which the next element of the URL can be a managed path.

  • Governance requirements determine how many site collections and content databases are necessary to support information management needs within a specific web application. However, you must be aware of scalability boundaries: you cannot have an indefinite number of paths, site collections, or content databases within a web application, nor can you store an unlimited amount of data within a site collection or content database.

4.2.9. Lesson Review

You can use the following questions to test your knowledge of the information in Section 4.2. The questions are also available on the companion media in a practice test if you prefer to review them in electronic form.


Note:

ANSWERS

Answers to these questions and explanations of why each answer choice is right or wrong are located in the Appendix A section at the end of the book.


  1. Three users are listed as site collection administrators for the Finance site: LolaJ, AprilM, and PatC. You discover that Lola and April are receiving email notifications about site collection storage limits, but you want Lola and Pat to receive the confirmations. What can you do to achieve this goal?

    1. Configure outgoing email settings.

    2. Use the Specify Quota Settings page in Central Administration.

    3. Change the order of users in the site collection administrators group by using the Site Settings page.

    4. Use the Configure Site Collection Administrators page in Central Administration.

  2. You discovered several new sites under http://teams.contoso.com/sites/ and you want to prevent users from creating new sites in http://teams.contoso.com. What can you do?

    1. Use the Manage Web Applications page of Central Administration.

    2. Use the Site Settings page of the http://teams.contoso.com website.

    3. Use the scsignup.aspx page of the http://teams.contoso.com website.

    4. Configure a site lock on the http://teams.contoso.com site collection.

  3. The content database SharePoint_Content_Intranet is approaching 100 GB, and you want to split its content into a second content database named SharePoint_Content_Intranet_B. What can you do?

    1. Use the Move-SPSite cmdlet.

    2. Use the Stsadm splitdatabase operation.

    3. Use the Manage Content Databases page of Central Administration.

    4. Use the Configure Content Deployment Paths And Jobs page of Central Administration.

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint