I’m currently planning an upgrade of our SharePoint 2007 intranet to SharePoint 2010. To give some background, we use SharePoint as an intranet portal and not as a document repository as we have a separate Autonomy iManage DMS. We have a few in house developed and third party web parts, but it’s mainly an out-of-the-box configuration, with a few style sheet changes for branding.
As I progress through the upgrade process I’ll continue to update this page with any information I think may be useful. A good place to start your upgrade project is a visit to the TechNet “Upgrade and Migration for SharePoint Server 2010” site http://technet.microsoft.com/en-gb/sharepoint/ee517214.aspx. Having read the “Determine upgrade approach” page here http://technet.microsoft.com/en-gb/library/cc263447.aspx, I decided on the database attach upgrade path. Following this path means that I don’t need to carry out an upgrade of our 2007 servers, so I know I ‘m not going to break existing intranet. Also, our 2007 servers are 32bit and as SharePoint 2010 is 64bit only, I’d have needed to build new servers anyway.
I decided to carry out a test upgrade using a copy of our development intranet and apply this to a new single server SharePoint 2010 installation. The SharePoint 2010 environment is a Hyper-V virtual server, which enables me to take snapshots at various stages of the process and retry parts of the upgrade if necessary.
Something to note is that to upgrade from SharePoint 2007 you need to be running service pack 2, or later. SP2 adds the PreUpgradeCheck stsadm command
This is the output of the command
The “missing server file of server configuration issues” section lists the IDs of web parts that are referenced by the database, but not installed on the web server. To determine the pages with the missing web parts I ran stsadm -o enumallwebs -includewebparts > c:\EnumAllWebs.txt . I then searched for the ID of each missing web part in EnumAllWebs.txt to see which pages were referencing the web parts.
Next, I navigated to the appropriate page, choose Edit Page and went to add a web part. Clicking on Closed Web Parts showed the error
As the missing web parts weren’t already on the page I discarded the page checkout and added ?Contents=1 to the page URL. This produces a list of all the web parts on the page. I then checked out the page and deleted the missing web parts.
I decided to take a copy of the database and test and upgrade. To find the name of the database I needed to backup, I opened Central Administration -> Application Management -> Content Databases (In the SharePoint Web Application Management section). Select the web application from the drop down on the right hand side and the database name is displayed in a table on the following page.
After restoring the database on the SharePoint 2010 database server I ran the Test-SPContentDatabase command from the SharePoint 2010 Management Shell. I piped the results to a txt file for easier reading.
The output showed a missing site definition with an ID of 10002.
In order to work out which sites referenced the missing site definition, I ran the following SQL query against the WSS_Content_Intranet database
SELECT Title, WebTemplate FROM dbo.Webs ORDER BY WebTemplate
I was able to identify the three sites using the missing site definition as test sites, which could be deleted. The next section of the output referred to missing features
Using the SharePoint Feature Administration and Clean Up Tool from CodePlex, I was able to identify the missing features. As the features were no longer required, I was able to retract and remove the features using Central Administration -> Operations -> Solution Management.
I then used the Feature Administration and Clean Up Tool to search for faulty features using the “Find Faulty Feature in Farm” function. I ran this repeatedly, removing any faulty features until no more were found.
The next section to tackle related to missing setup files
The message mentions the Bamboo File Share Library web part. This was something that was installed for testing, but not removed. I cleaned up the test pages that reference any of the missing web parts and removed any unneeded web parts using Central Administration -> Operations -> Solution Management.
One of the missing setup files was an image. I didn’t recognise this file, so I ran the following SQL query against the WSS_Content_Intranet database
SELECT * FROM AllDocs WHERE SetupPath LIKE '%Arrow_Module%'
Looking at the DirName column, I was able to see that folders where a copy of the image was held. Viewing the image reminded me that it was used by one of the web parts I removed earlier. The image shouldn’t be required any longer as the web parts had been removed. I navigated to the top level site, then clicked on Site Actions -> Site Settings -> Modify All Site Settings. Next I clicked on Web Parts under Galleries. Some of the web parts that had been removed from Solution Management we still in the web part gallery, so deleted the unneeded web parts by clicking on Edit -> Delete Item.
Having cleaned up all the unneeded web parts and test pages it’s important to remove them from the user and admin recycle bins. Click on Site Actions -> Site Settings -> Modify All Site Settings, then Recycle bin under Site Collection Administration. The user and admin bins are selectable using the view on the left of the page.
Now the SharePoint 2007 environment was clean I restored the SharePoint 2010 environment to a clean snapshot I took before testing the upgrade and restarted the upgrade process.
First, I restored a fresh copy of the WSS_Content_Intranet database onto the SharePoint 2010 SQL instance. Next, I deleted the content database for the default web application by going to Central Administration -> Application Management -> Manage Content Databases. Click on the database name, scroll to the bottom of the next page, tick “Remove content database” and click OK. The next step is to upgrade the database. From the SharePoint 2010 Management Shell run Mount-SPContentDatabase -Name <DatabaseName> -DatabaseServer <ServerName> -WebApplication <URL> [-Updateuserexperience] . You use the Updateuserexperience switch to choose to preview the visual upgrade that can be enabled in SharePoint 2010.
Once the upgrade was complete, I installed the required web parts and reapplied any customisations.
Now that the site was upgraded to SharePoint 2010 I wanted to see the impact of doing the visual upgrade to SharePoint 2010. I reverted to an early snapshot of the server and re-ran the upgrade, this time using the -Updateuserexperience switch of the Mount-SPContentDatabase command. I found that all the sites had the new visual style, except for the home page. I tried to enable the visual upgrade from Site Actions – Site Settings -> Visual Upgrade under Site Collection Features, but the option was greyed out. In order to upgrade the home page I used the following command from the SharePoint 2010 Management Shell
$web = Get-SPWeb http://server/site
$web.UIVersion = 4
$web.UIVersionConfigurationEnabled = 0
SharePoint Manager from CodePlex http://spm.codeplex.com/
SharePoint Inspector from CodePlex http://spi.codeplex.com/
SharePoint Feature Administration and Clean Up Tool from CodePlex http://featureadmin.codeplex.com/