How to Upgrade SharePoint 2007 to SharePoint 2010
(Part 3B of 3)

(In this final post in a  4-part series on How to Upgrade SharePoint 2007 to SharePoint 2010 series resident SharePoint Engineer Joe Beyer provides insight on the configuring Microsoft SQL Server and the final steps using the Database Attach upgrade process.) 
In my last post, I covered one of the two primary methods of upgrading SharePoint: the In-Place Upgrade. Now let’s take a closer look at using the ‘Database Attach’ method of upgrading.

Database Attach

For this method, I am going to assume the following tasks have already been completed:

  • SharePoint 2010 required hardware and software is already in place and ready for upgrade.
  • Current SharePoint 2007 environment has been patched with Service Pack 2 or later.
  • Successfully ran PreUpgradeCheck (stsadm –o preupgradecheck).
  • Ran the prerequisite installer on each web server in the farm.

Now that you have completed everything above, we’re ready to get started. The first step for this method is to ensure your current environment is in Read-Only mode.

One of the benefits of this method is that it can be done while the site is still up and accessible. Due to the fact that you are moving the environment, you don’t want any users making changes that will impact the integrity of the data. Therefore, placing it in read-only is very important. The easiest way to place your site in read-only is by browsing to Central Administration > Application Management > SharePoint Site ManagementSite Collection Quotas and Locks. Ensure the correct site collection is selected and choose Read-only (blocks additions, updates, and deletions).

SharePoint Central Administration screenshot

I realize many of us have multiple Web Applications and many more site collections, so using Central Administration can be a bit taxing. Another method is to use Microsoft SQL and place the databases in read-only. Depending on what version of SQL your 2007 environment is on, there are a few different methods to use.

Microsoft SQL Server 2005

  1. Locate the database in SQL Server Enterprise Manager > Right Click > Properties.
  2. Click on Options tab.
  3. In the Access section, choose Read-only, and click OK.

SQL Server 2008 Database Properties screenshot

Microsoft SQL Server 2005 & 2008

  1. Locate the database in SQL Management Studio > Right Click > Properties.
  2. Choose Options.
  3. Other Options, in State section, select True next to Database Read-only. Click OK.

Now that your environment cannot be changed or edited, it’s time to get our [database] move on! As I am sure you are already well aware, there are multiple methods for just about anything. Moving databases is no exception. To ensure that your current SharePoint site does not become inaccessible, the best method here is a database backup. SQL allows you to take a backup of the database while the site is still online and accessible. Depending on what version of SQL your current 2007 environment is housed on, there backup methods are:

Microsoft SQL 2000:

  1. Open Microsoft SQL Enterprise Manager.
  2. Right Click the appropriate database, select All Tasks > Backup Database.
  3. In the SQL Server Backup dialog box, specify the name of the backup and choose DatabaseComplete.
  4. Specify a Destination for the backup.
  5. Click OK to start the backup process.

Microsoft SQL Server 2005 & 2008:

  1. Open SQL Server Management Studio and connect to appropriate server instance.
  2. Right click the appropriate content database, point to Tasks > Backup.
  3. On the Back Up Database dialog box, verify the correct database is displayed in the Source area.
  4. Choose Full backup type.
  5. Specify a Destination for the backup.
  6. Click OK to start the backup process.

Screenshot of database backup in Microsoft SQL Server

Alright, now that you have your backup file, you can now move that file to the new environment and restore it to the new SQL Server 2008 server. The steps to restore are essentially the same as taking a backup. Using the steps above, choose Restore instead of Backup. In either case, be sure to check the box stating “Overwrite the existing database.”

SQL Server database restore screenshot

Once the restore process has finished, you must reverse the steps above to make sure the database is in Read-Write mode once again. Now that you’ve changed the database mode from Read-Only to Read-Write, it’s time to test and mount the new database to the new SharePoint environment; which also upgrades the database to SharePoint 2010.

Now that the content database exists in your new SQL environmentand can be accessed by the Web Front Ends, it’s time to complete the upgrade. From a server running SharePoint 2010, you need to test the database to ensure all custom components will be compatible with the new environment. Using Windows PowerShell, run the following command:

Test-SPContentDatabase –Name <DatabaseName> -WebApplication <URL>

For more information on command syntax, please see this Microsoft TechNet article.

Now that you have confirmed the content will work well with SharePoint 2010, it’s time to mount the database. The following PowerShell command will attach the database to the specified Web Application:

Mount-SPContentDatabase –Name <DatabaseName> -DatabaseServer <ServerName> -WebApplication <URL>

For more information on command syntax, please see this Microsoft TechNet Article.

Once this command has completed, it does not necessarily mean the upgrade is complete. You must browse to Central Administration > Upgrade and Migration > Check Upgrade Status to determine when the upgrade is complete. Once the upgrade has succeeded, you can then browse to the site and verify content. Your new SharePoint 2010 environment should look like this:

SharePoint 2010 Central Administration screenshot

Still have questions? Please leave a comment below.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

About Fpweb.net Crew

Our business is centered on bringing enterprise-class strategy, support, and security to your hosted or managed platforms no matter where you choose to deploy your environment. We specialize in providing managed services, cyber security, and expert, USA-based, 24/7 Absolute Support® on-premises, or in any cloud.
This entry was posted in SharePoint Tips & Tricks and tagged , , , , , , , , , , , . Bookmark the permalink.

4 Responses to How to Upgrade SharePoint 2007 to SharePoint 2010
(Part 3B of 3)

  1. theresa luby says:

    Have you seen an instance where the stsadm preupgradecheck passed on Features, but the Test-SPContentDatabase found errors and the mount failed?

    On my first attempt when the preupgrade failed, I got errors that looks like the following:

    [powershell] [SPContentDatabaseSequence] [ERROR] [7/3/2012 1:17:58 PM]: Found a missing feature Id = [065c78be-5231-477e-a972-14177cc5b3c7]

    [powershell] [SPContentDatabaseSequence] [ERROR] [7/3/2012 1:17:58 PM]: The feature with Id 065c78be-5231-477e-a972-14177cc5b3c7 is referenced in the database {DBName]

    I found a tool on codeplex that found and cleaned up these features and then my stsadm preupgradecheck passed. I backed up the DB again and tried the test again, but it still fails.

    Theresa

  2. Joe Beyer says:

    @theresa luby

    Theresa,

    I have seen the Test-SPContentDatabase fail a few times in similar scenarios. From my experience, this has been related to compatibility issues between those respective features and SharePoint 2010.

    I too, have used the FeatureAdmin tool that removed orphaned features, which has been very helpful.

    Have you tried removing the failed 2010 features using the same FeatureAdmin tool, prior to Mounting the database?

  3. Thanh says:

    Hi Joe,

    What is your reconmendation for migrating a huge 1.6 Tb SP2007 content database to SP 2010? I tried Mount-SPContentDatabase last time and waited over 16 hours. I had to abort. Previous admin made a bad decision in creating sub sites instead of site collections. There is no way for me to add content database.

  4. Joe Beyer says:

    @Thanh

    Hi Thanh,

    As I am sure you are aware, the general recommendation by Microsoft for a single content database is 200GB. Unfortunately, there are not a whole lot of options for you, other than breaking up that content in to multiple content databases. The following link provides some great insight on that:

    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/7fa81644-755c-4c11-bbdf-18662f65960a/

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's make sure you're human first: *