Series: Upgrading your Content DB to SharePoint 2010
- Upgrading your Content DB to SharePoint 2010 – Part 1, The preupgradecheck
- Upgrading your Content Database to SharePoint 2010 – Part 2, the Database Attach method
Welcome back to the second article in this series on upgrading a SharePoint 2007 content database to SharePoint 2010.” In part 1 we deep dived into the preupgradecheck that Microsoft made available with SharePoint 2007 SP2 and today we will complete our upgrade journey utilizing one of the 3 upgrade models that are available to you by Microsoft.” These are listed as follows;
- In-place upgrade
- Database attach upgrade to a new farm
- Hybrid approach (Read -only databases or Detach databases)
There is a wealth of information regarding these different approaches on the Microsoft TechNet site under the Upgrade and Migration Resource Center for SharePoint 2010. I will also outline other resources at the end of this article for convenience.
The upgrade model that I have chosen in this article series is the Database attach upgrade approach in which I will outline in this step by step guide.” The upgrade choice you choose is dependent on a number of factors such as how much down time can you afford and whether you are moving onto newer hardware.” All three options have their strong and weak points which is outlined in the following TechNet article; Determine Upgrade approach (SharePoint 2010)
This article is assuming that your SharePoint 2010 environment is up and running.
When using the database attach method to upgrade your databases to SharePoint 2010, you need to be aware that none of your configuration settings in SharePoint 2007 will migrate.” You will need to ensure that you have replicated your 2007 environment in the newly created 2010 farm.” Some of the items to consider include the following;
- Outgoing email server
- Alternate Access Mappings (AAM)
- Quota templates
- Included paths
- Install any custom or 3rd party features, including web parts, solutions
- Custom site definitions
- Custom CSS
In order for you to perform a database attach upgrade into your SharePoint 2010 environment you need to ensure that you have created a new web application.
Step 1 :: Restoring a copy of your SharePoint 2007 content database
Now that we have ensured that all our configuration settings are in place, and that all custom features, web parts and solutions have been re-instated, we can now proceed with our upgrade.” You will need to firstly backup and take a copy of your SharePoint 2007 content database and restore it to the newly created SharePoint 2010 farm.
I’m performing my database restore utilizing SQL 2008 Management Console.” Right click on Databases and select Restore Database.
Select your source and destination as follows;
Click on Options and ensure you have selected Overwrite the existing database.
Click OK.
We should receive the following confirmation message once the database has been successfully restored.
Step 2 :: Verifying the Content Database
As you have already noticed from our first article, in particular with the introduction of the preupgradecheck, Microsoft have done a great job in providing us with the necessary tools to ensure a successful upgrade.” The next tool that we will be using is the Test-SPContentDatabase Windows PowerShell cmdlet.” This cmdlet will test and verify that any custom components that are required for this content database has been installed and configured in the SharePoint 2010 environment.
Test-SPContentDatabase -Name -WebApplication |
Launch the SharePoint 2010 Management Shell and type the above command, ensuring you have entered your Database Name and URL. e.g. below
Test-SPContentDatabase -Name WSS_Content_Intranet -WebApplication http://intranet.allthefixes.com |
The Test-SPContentDatabase is a great reporting tool that will list any missing setup files, web parts and provide you with information on how to remedy any errors.” It will also specify whether these missing features will block the upgrade from succeeding.
You can either attend to these missing features pre or post-upgrade but this depends on whether there are any items that will block the upgrade from proceeding.” Once you have remedied the above, we can proceed with our next tool, which will add the content database to our Web Application.” The stsadm” addcontenddb command line parameter is as follows;
stsadm -o addcontentdb -url -databasename |
Before proceeding, ensure that there are currently no databases connected to the web application that we will be attaching to.” You can check this via Central Administration > Application Management > Manage content databases.
If one is listed, you can remove the existing attached database by clicking on the actual database name and then clicking on the “Remove content database” check box.
You will receive the above warning which is safe to ignore.” In this instance we are not deleting the actual database but disassociating it from the selected Web Application.” This is the exact same behavior that was available to us in SharePoint 2007.
We can now proceed and attach our restored SharePoint 2007 database via the following stsadm command line;
stsadm -o addcontentdb -url -databasename |
In my instance, the command looked as follows;
stsadm -o addcontentdb -url http://intranet.allthefixes.com -databasename WSS_Content_Intranet |
This will initiate the upgrade process as per the below screen capture.
You will eventually receive a message similar to the below advising that the upgrade was completed albeit with errors in my case.” You should review the upgrade log file which is quite extensive and lengthy, and sure enough the errors were all related to missing features etc which I was already aware of.
We can now verify that the upgrade was completed successfully by first navigating back to Central Administration / Application Management / Manage content databases, which now displays the upgraded database under my designated Web Application.
We can also view the upgrade status page which is located within Central Administration > Upgrade and Migration > Check upgrade status.” The page will list all previous upgrade attempts and summarize the number of errors and warnings that may have been encountered.” In my case, there were a number of features that were not installed in the new SharePoint 2010 farm that the current portal relies on.” All of the upgrade logs are located in the following location, providing you with finer detail on the errors and warnings encountered;
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\LOGS |
By default, your site will retain its 2007 theme which Microsoft have done on purpose and you will need to manually change this 2010 if you wish to do so.” This is referred to as the “Visual Upgrade”, providing site administrators the ability to switch to the new look and feel at their own leisure.” This is a great move by the SharePoint product team as the new interface can be quite overwhelming to begin with.” Think about the move from Office 2003-2007 with the introduction of the new ribbon interface.”” There was a week or two of frustration for most users before eventually getting the hang of it and finding the new interface to be more productive.
The below screen capture is my upgraded SharePoint 2010 portal running in “SharePoint 2007 theme mode”.
To perform the Visual upgrade, navigate to Site Actions / Visual Upgrade.
Here you are provided with 3 options in which I will select “Use the new SharePoint user interface, and don’t ask me again”.” After clicking on OK, I am now presented with the same site utilizing the default SharePoint 2010 theme.
We have now successfully upgraded one of our SharePoint 2010 content databases housing our main Intranet portal, albeit with some missing web parts and features.” So what’s next on the agenda?” Upgrading My Sites of course!” This will involve attaching and upgrading your Shared Service Provider (SSP) to upgrade your user profile information followed by upgrading the My Sites content database.” This process will be left for a future post.
I hope you have found this 2 part series useful and I am interested hear how many of you have attempted a SharePoint 2010 upgrade and your experiences.
Resources from TechNet
Determine Upgrade approach (SharePoint 2010)
Microsoft SharePoint 2010 Products Upgrade Approaches – Diagrams
Upgrading to SharePoint Server 2010
Preparing to upgrade to SharePoint 2010 Products
Attach databases and upgrade to SharePoint Server 2010