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;

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;

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

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.

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 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>

Launch the SharePoint 2010 Management Shell and type the above command, ensuring you have entered your Database Name and URL. e.g. below

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 <URL> -databasename <database name>

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 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;

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 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.

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.

but when switch to SharePoint 2010 visual upgrade give me the following error

Visual Upgrade failed. The default master page for this user interface could not be found at “/_catalogs/masterpage/v4.master”. Add the requested master page at this path and try again.

Mike

Were you able to figure this out? I’m having the same problem

lvirden

when one does the database attach approach – via say stsadm -o addcontentdb – what happens when the content database contains the SP 2007 root site collection? One would, I presume, already exist on the SP 2010, and I doubt seriously that one would want to overwrite it with the old SP 2007 one. However, the SP 2007 one would have sites, lists, etc. that contained critical information.