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 preupgrade tool that Microsoft made available with SharePoint 2007 SP2 and today we will complete our upgrade journey utilising 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 (albeit in beta form). I have published a 3 part series in getting your SharePoint 2010 environment up and running that you can access from the following links;
- Installing SharePoint 2010 Beta on a Windows 2008 R2 Server
- Configuring SharePoint 2010 (Beta) Service Applications and User Profile Service Synchronization
- Creating your first SharePoint 2010 Beta Web Application and Site Collection
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. If you have not done so, you can follow my step by step guide on Creating your first SharePoint 2010 Beta Web Application and Site Collection.
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 utilising 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.
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 preupgrade check tool, 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 <database name> -WebApplication <URL>
Test-SPContentDatabase –Name WSS_Content_Intranet -WebApplication http://intranet.georgekhalil.com
stsadm -o addcontentdb -url <URL> -databasename <database name>
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 behaviour 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 <URL> -databasename <database name>
In my instance, the command looked as follows;
stsadm -o addcontentdb -url http://intranet.georgekhalil.com -databasename WSS_Content_Intranet
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 summarise 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;
By default, your site will retain it’s 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 utilising 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
Articles in this series