Book Image

Microsoft SharePoint 2010 Administration Cookbook

By : Peter Serzo
Book Image

Microsoft SharePoint 2010 Administration Cookbook

By: Peter Serzo

Overview of this book

Collaboration and content management are the major business needs of every organization in this increasingly global and connected environment. Microsoft SharePoint is a solution to these needs that offers a software platform that facilitates collaboration and provides content management features for the effective implementation of business processes. With a vast amount of functionality available with SharePoint, it is easy to get confused in carrying out administrative tasks. Microsoft SharePoint 2010 Administration Cookbook starts off by demonstrating the various upgrading and post-upgrading tasks to be performed in SharePoint 2010. Next come recipes for managing SharePoint service-level applications and for monitoring the SharePoint environment. The book introduces one of the best new tools that should be in your arsenal, PowerShell, and the commands you will need to script your tasks with Powershell. Collaboration and content management are the most important features of SharePoint and this book contains many recipes that focus on improving them. Enterprise monitoring and reporting are also covered in detail so that you can ensure that your SharePoint implementation is up and running all the time. You will find recipes to manage and customize SharePoint Search. When you are half way through the book, you will explore more advanced and interesting topics such as customizing and securing the SharePoint environment. You will learn to extend SharePoint to include features similar to social networking sites such as Facebook and Twitter. Lastly, the book covers backup and recovery solutions for SharePoint so that you can ensure that your system is protected from data loss and virus attacks.
Table of Contents (17 chapters)
Microsoft SharePoint 2010 Administration Cookbook
About the Author
About the Reviewers

Creating and associating content databases to a specific web application and site collection

A web application is not limited to using a single content database. SharePoint allows you to associate many content databases to a web application. One of the reasons to do this could be based on the size of the content database. If the content database is larger than 200 gigabytes, it makes more sense to distribute this content across two content databases.

A different consideration is factoring the type of data that is being housed in the content database. If there is a marketing site that contains media files such as photos and video, it may be desirable to create a content database just for this site collection data. Another example is housing all legal data into one content database/site collection for a litigation department.

Finally, a major benefit of doing this is disaster recovery. Knowing where your data is, and how it is structured, will allow you to implement a disaster recovery strategy that is efficient, effective, and flexible.

The data that is created is not the same, that is, we have various kinds of data. Data has different properties and may even have different backup and restore service level agreements. However, multiple content databases may be connected to one web application.

This recipe will show how to create multiple content databases to one web application and apply the appropriate site collection to the corresponding content database.

Getting ready

Ensure that you are a member of the Farm Administrators SharePoint group on the computer accessing the Central Administration site. You must have the correct permissions to create a database (typically dbcreator and sysadmin).

How to do it...

  1. 1. Open the Central Administration screen. Under Application Management in the Databases section, click Manage Content Databases.

  2. 2. At the top of the resultant page is the Add a content database option. Click the option and the following screenshot will be displayed:

  3. 3. The database name is given a GUID suffix by default. Change the database name to be relevant but use a naming convention. In the case of the preceding screen, I will change database name to WSS_Content_Marketing. Keep the rest of the defaults and click OK.

    The content database will be created and listed under Manage Content Databases.

  4. 4. To ensure that the site collection gets added to the proper content database, ensure that you are still under Manage Content Databases.

  5. 5. Click on the content database(s) you don't want the site collection to get added to.

  6. 6. Under the Database Information settings, set the Database status to Offline. Click OK. Refer to the next screenshot:

  7. 7. Navigate to Application Management, then Site Collections. Under this section, click Create site collections.

  8. 8. Fill the information for Title, URL, select a template, and include a primary site collection administrator. Click OK.

  9. 9. The site collection should be created and added to the appropriate content database. To check this, navigate back to the Manage Content Databases screen. See the example shown in the following screenshot. WSS_content_7777 is Stopped (offline) and the new site has been added to WSS_Content_Marketing.

  10. 10. Reverse the action from step 6 and put the content database back in Ready state.

How it works...

The first half of the procedure is self explanatory. We are creating a content database under the appropriate web application. The second half of the procedure takes the database offline. This action will ensure that the next site collection cannot be added to that database.

The action of assigning a site collection to a content database is very similar to network load balancing. The site collections are assigned quite evenly across the content databases while they are online.

There's more...

When doing a SharePoint 2010 upgrade of multiple content databases, ensure that the first content database that you add contains the root site for the associated web application. The rest of the content databases for the web application can be added in any order afterwards.

More info

There will be times when you do not want to add any more site collections to a content database. In order to accomplish this, perform the following steps:

  1. 1. In Central Administration, under the Databases section, click on the Manage Content Databases option.

  2. 2. Click on the database that you wish to no longer add site collections to.

  3. 3. Change the Maximum number of site collections settings (under Database Capacity Settings) to be equal to the current number of site collections.

  4. 4. Change the Number of sites before a warning event is generated setting to be one less that the current number of site collections.

More info

You have seen how to do this recipe through the user interface. There is a way to do the same procedure through scripting. PowerShell is the new way of scripting, but the stsadm command set is still available. Here are both methods:

  • Using stsadm command:

    stsadm -o createsiteinnewdb -url <url> -owneremail <email> -ownerlogin <domain/name> -sitetemplate <site template> -title <title> -databaserver <serverdb> -databasename <dbname>
  • Using PowerShell, we need to run the following two commands: