By: Wahid Saleemi | Last Updated: 2011-02-09 | Comments | Sharepoint
Microsoft has improved the quality and frequency of updates for SharePoint since MOSS 2007 was released by using cumulative updates. However, as a SharePoint Administrator, you'll have to deal with downtime while these updates install. Some updates may even require reboots, disconnecting from the farm and running PSConfig (also known as the SharePoint Products and Technologies Wizard). Because some updates make changes at the database level, having very large databases will potentially cause hours of downtime for the entire farm.
Luckily, we have a trick that can be used to apply updates more quickly and isolate large content databases so they aren't holding up everyone else. This procedure involves detaching any large content databases, applying the updates, and then re-attaching the content databases. Since the databases will not be visible to SharePoint, no updates will be applied to them until they are re-attached. Let's look at a few ways to do this.
This is the procedure to use at first and ensure no mistakes are made.
- First, record the names of the content databases you will detach for each Web Application.
- Execute the command to detach the content database(s).
- For SharePoint 2010, use PowerShell: Dismount-SPContentDatabase "<ContentdBName>"
- For SharePoint 2007, use STSADM: stsadm.exe -o deletecontentdb -url <WebApplicationUrl> -databasename <ContentdBName> -databaseserver <DatabaseServerName>
- For SharePoint 2010, use PowerShell: Mount-SPContentDatabase "<ContentDb>" -DatabaseServer "<DbServer>" -WebApplication http://SiteName
- For SharePoint 2007, use STSADM: stsadm.exe -o addcontentdb -url <WebApplicationUrl> -databasename <ContentdBName> -databaseserver <DatabaseServerName>
Mattias Karlsson has written a script that will perform some of these manual steps for you. If you're dealing with a smaller farm, the manual procedure will probably be faster. However, if you're dealing with several farms and many content databases, this script may have the advantage.
- Head over to Mattias' blog to download a copy of SP-Upgrade script: http://mysharepointofview.com/downloads/
- Next create a folder named "Media" and place the script there. When extracted, the script file is named SP-Upgrade.ps1. Since we are likely doing this because we have a lot of servers, create this on a file share accessible to all servers.
- Download and extract the updates to the "Media" folder. An example of extracting updates, can be found on the MSSharePointTips.com article: Slipstream Office SharePoint Server 2007 Service Packs.
- Rename the .exe files in the "Media" folder so that they begin with a digit representing the order in which they should be installed.
- On the SharePoint Server, open PowerShell and type: SP-Upgrade -Binaries -DetachContentDBs
- The previous command detaches content databases and installs the updates. After it's finished, you'll need to run PSConfig and re-attach the content databases: SP-Upgrade -PSConfig -AttachContentDBs
Although this procedure takes a bit longer to setup, it can save a lot of time if you have a large SharePoint Farm or multiple SharePoint Farms.
Using these procedures will allow you to restore SharePoint services to most of your users, leave only the "data hogs" to wait for their upgrade.
- Find the latest updates at the SharePoint 2010 Update Resource Center.
Last Updated: 2011-02-09