Secret ingredients to quality software

SSW Foursquare

Rules to Better SharePoint Migration from 2007 to 2010 - 15 Rules

Since 1990, SSW has supported the developer community by publishing all our best practices and rules for everyone to see.

If you still need help, visit SharePoint Server Consulting and book in a consultant.

Migrating from SharePoint 2007 to SharePoint 2010 can be a daunting task, but if you follow this guide you will be able to migrate with minimum problems.

These rules focus on migrating from a single server configuration of SharePoint 2007 to a single server configuration of SharePoint 2010. We will assume your SharePoint 2007 server has the DNS of

Do you agree with them all? Are we missing some? Email us your tips, thoughts or arguments. Let us know what you think.

  1. Do you add stsadm to environmental variables

    In SharePoint 2007, it is a good idea to add the path to stsadm.exe into the environment variables on a SharePoint server so you can open a command prompt and run the tool from anywhere.

    stsadm Figure: you should be able to quickly type ‘stsadm’. Believe me you will be typing it enough! In SharePoint 2010, you can skip quite a few steps by using the PowerShell Console.

    SP2010PowerShell Figure: Using SharePoint 2010 Management Shell

    More Information for SharePoint 2007

    1. In the start menu type Edit the system environment variables and run the tool EnvVariables

      Figure 1 - Search for "Edit the system environment variables” in the Start Menu

    2. In the System variables section, select Path and click **Edit ** EnvVariables2

      Figure 2 - Under System Variables | Select Path | Click Edit

    3. Add the path at the end of the Variable Value

      1. For a SharePoint 2007 Server, enter: ;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin
    4. You may need to reboot the server
    5. You can now run stsadm from anywhere in the command prompt
  2. Do you have a SharePoint Master?

    You all know about a web master, the central point of contact if the website goes down. You should know about Schema Masters for Database Design. SharePoint should be no different.

    The SharePoint master should be your companies SharePoint expert. All major changes to the SharePoint servers should be run by the SharePoint master including:

    • Deploying or removing solutions and features
    • Creating web applications
    • Migrations
  3. It is a good idea to run a pre-migration check on the SharePoint 2007 before starting the migration process.

    1. Check you have followed Do you add stsadm to the environmental variables?
    2. Open up cmd with Administrator privileges
    3. Run the following command: **stsadm –o preupgradecheck

    ** preupgradecheck ** Figure 3 - Check the pre-migration report. The only thing that is allowed to fail is “FeatureInfo”. This is because a custom feature won’t migrate and developers need to create a build targeted for SharePoint 2010 **

    1. Save the HTML file that was generated and email it to your companies SharePoint Master. (Don’t print it as its very large)
    2. Have the SharePoint Master sign off on the pre-migration check and inform you if there are any site collections or content sources that are no longer needed and can be ignored for migration
  4. When you move to SharePoint 2010, nothing is to unexpectedly disappear. So prior to the migration, you need to find out which solutions you currently have installed and decide if you will be installing them on the new server.

    1. On the SharePoint 2007 Server, open Central Administration and go to Operations | Solution Management
    2. Copy the Solution Name, Status and Deployed To into the following table. This will ensure you deploy all the solutions you had on your old server to the SharePoint 2010 server
    3. Cross out any solutions that you will not be migrating
    4. Get the SharePoint master to sign off on the solution list

    MigrateSolutionsList Figure: Have your SharePoint Master confirm if all these solutions are to be migrated

  5. When you move to SharePoint 2010, you will need to know the settings you had on your 2007 server.Therefore document all the settings from the SharePoint 2007 server, that you will need to re-create on the SharePoint 2010 server.

    Fill in the following table. You will use this later when creating the new web application in SharePoint 2010.

    SharePoint 2010 Web Application OptionWhere To Find This In SharePoint 2007Answer
    Authentication ProviderUse  classic  unless you know you need  **claims based authentication 
    ** Note: this is a new feature in SharePoint 2010.
    New IIS Web Site NameApplication ManagementWeb application list
    PortApplication ManagementWeb application list
    Port number will be listed on end of URL (if nothing its port 80)
    Host HeaderApplication ManagementWeb application list
    If a DNS name is  NOT  used, leave this blank.
    Authentication ProviderApplication ManagementAuthentication Providers
    Allow AnonymousApplication ManagementAuthentication Providers
    Use Secure Sockets LayerCheck whether the SharePoint site URL like “ https ://***”
    Public URLAutomatically updated from Host Header
    Application pool nameLeave defaults
    Security account for this application poolLeave defaults
    Database NameZz the database name so you know this will be replaced (read zzOldFiles)

    | |

  6. (Not recommended)In unusual cases where you don’t have source code (for your own customizations) or the setup files (from 3rd party vendor) of the SharePoint solutions that have been deployed in the SharePoint 2007 server, there is a way to export the solution files.

    1. Download Solution Exporter from Mark Wagner's Cogitation Blog and run it on the SharePoint 2007 server. This allows you to export the installed solutions from the source SharePoint server.
    2. Export all of the solutions out of the SharePoint farm.
    3. Copy the C:\SharePointCustomizations folder to the destination SharePoint 2010 server.
  7. You should have at this point, either:

    1. Installer packages from 3rd Party Vendors for installing their custom solution or,
    2. WSP packages from 3rd party, or built from your own source code, or extracted using the Export Method (not recommended)

    You can add the WSP package solutions to the new server by:

    1. Open up cmd with Administrator privileges
    2. Enter your C:\SharePointCustomizations folder cd C:\SharePointCustomizations
    3. Use stsadm to import the solution to your new server Stsadm –o AddSolution –filename NameOfSolution.wsp
    4. Make sure there are no errors when the command runs
  8. We are now ready to make a new web application and site collection which we will need to match closely to the original SharePoint 2007 server. In the SharePoint 2010 server:

    1. Open SharePoint Central Administration | Manage web applications
    2. Click on New
    3. Enter in the details for the web application using the document from the rule Do you document the details of your SharePoint 2007 web application?
    4. Go back to SharePoint Central Administration | Create site collections
    5. Fill out the form to create a new site collection – the only option that is important here is to create a site collection that matches the site collection you will be migration. Eg: If the site collection you are migrating is a Team Site, make a site collection that is a Team Site.

    Note: The rest do not matter as they will be replaced when you restore the database from SharePoint 2007.

  9. Solutions must be deployed to the new site collection before the content database is resorted to the SharePoint 2010/2013/2016 server:

    1. Open SharePoint Central Administration | System Settings | Manage Farm Solutions
    2. Click on Deploy Solution
    3. Refer to the table you completed in the rule Do you confirm your list of installed Solutions and deploy the solutions to the same site collections they were deployed to on the SharePoint 2007/2010/2013 server.
  10. Email the staff members advising a migration is about to take place and they will not be able to check in or edit documents, and should expect errors if they do so.

    OutageEmail Figure - Send your staff an email warning of the outage Do you know how to send a good network outage email?

  11. Even though you have advised staff members a migration is taking place – you can guarantee someone will try to check-in or edit documents. The best way to prevent this is to put your content database into read-only mode, locking the content database.

    There are two options to lock the content database.

    Option 1 ( Recommended ):

    1. Open SharePoint Central Administration site, navigate to "Application Management " | "Site Collections " | " Configure quotas and locks ". quotas and locks
    2. Select the "site collection" which you would like to lock.
    3. Choose "Read-only (blocks additions, updates, and deletions)", then click "OK". read only status Note: Read more at Manage the lock status for site collections in SharePoint 2013 Option 2 ( not recommended ):
    4. On your database server open SQL Server Management Studio
    5. Right click on the content database associated with the site collection you're migrating | Properties
    6. Choose Options | Scroll to the bottom of the options list
    7. For the Database Read-Only choose True

    Figure - Database Properties | Options | Database-Read Only

    1. Now it’s safe to take a backup of your content database

    NOTE: When some SharePoint timer services are run it may cause the site to display errors when the database is in read-only mode

  12. This is the meat of the migration process. First we need to detach the current content database from the Web Application:

    1. On the SharePoint 2010 server, open SharePoint Central Administration | Application Management | Manage Content Databases
    2. Set the Database Status to offline | tick Remove content database
    3. Open SQL Server Management Studio and delete the database you just removed from the web application

    Now we need to attach the database backup we took of our SharePoint 2007 server:

    1. In SQL Server Management Studio right click on Databases | **Restore Database…

    RestoreDatabase Figure 6 - Select “Restore Database”

    • Follow the prompts to restore your database **
    • Take the database out of read only mode (it will be in read only mode because we backed it up in read only mode)

    Now we need to attach the content database to the web application:

    1. Open up the SharePoint 2010 Management Shell with administrative permissions.
    2. Run the following command to attach the database to the web application (replacing the red text to match your environment)
    stsadm –o addcontentdb –url http://sp2010rc/ –databaseserver <DatabaseServerName> –databasename <ContentDatabaseName>
    1. After the database has been restored you will get a status message telling you how the upgrade went, with the path to a log file. Send this file to the SharePoint developers to determine if any issues occurred during the migration
  13. After the database has finished being attached to the web application you will get a log file with information about the import process.

    1. Open up this log fine and pay special attention to any lines with [ERROR] .

      Note #1: The most common reason for errors is that you have forgotten to activate a feature.

      Note #2: If you have your own custom solutions, show this file to your developers to ensure it isn’t your custom solution causing the errors.

    2. Check your Application Event log after migration for errors related to your SharePoint Web Application, and fix these accordingly.


    figure: the event log should show 0 errors after fixing the errors

  14. After you have finished migrating the database, it is extremely important to verify that no data has been lost in the move. The quickest way to do this is to compare the SharePoint 2007 and the SharePoint 2010 server All Site Content pages and confirm that the item numbers match:


    Figure 7 – In the "All Site Content" pages library, ensure the ‘item’ numbers exactly match between SharePoint 2007 and SharePoint 2010

    1. Look at your report from the SharePoint 2007 server
    2. On the SharePoint 2010 server, open the site collection you just migrated to
    3. Select Site Actions | Site Settings
    4. Select All Site Content
    5. Compare item numbers with 2007

    Repeat this process for all sub-sites of the site collection you migrated.

  15. Do you confirm there is no checked out data?

    One of the annoying things with SharePoint document libraries is that users often accidentally leave checked out files, that preventing others from modifying them.

    Suggestion to Microsoft: send an email to the user to remind them they have outstanding checkouts potentially blocking other users.

    sp docs
    Figure: Here Greg Harris has not checked in a file

    Upgrade warning: The pages that are not checked-in, will not be migrated on a SharePoint upgrade. There is *no* warning either.

    There are 2 ways to remind users of their "checked out files":

    • Solution A: Manage Content and Structure Report (No Code)
    • ** Solution B: Custom application report (Includes some coding work) Eg. SSW.Dory **

    Solution A. Manage Content and Structure Report (No Code)

    1. Create CAML query in site content and structure

    Go to "Site Settings | Manage Content and Structure | Content and Structure Reports", click "New":

    Figure: Create a new report

    Fill the "CAML Query":<Where><IsNotNull><FieldRef Name="CheckoutUser" LookupId="TRUE"/></IsNotNull></Where>

    Fill the other fields like below:

    Figure: Fill in form

    1. Run Checked Out report

    Run the checkout report from "Site Settings | Manage Content and Structure | View: Checked out documents":

    Figure: Checked Out Documents report link Make sure there are no files checked out, otherwise, go step 3

    1. Go chase after the users.

    **Solution B. Custom application report (Includes some coding work)**

    TODO: Move this tool to GitHub, find a better name than "SSW.SharePoint.CheckedOutFilesReport". Also change from a farm solution to a solution that can be used on Office365 - now in SharePoint 2016 and SharePoint online called "Sharepoint Add-ins"

    To make reminding users easier, this SharePoint Add-in has a custom page to show the "Checked out files". One button will send the notification email to all the naughty people.

    Even better, we have also improved the application with a scheduled task using SharePoint CSOM API to find checked out files and send these notification emails automatically every night.

         <img class="ssw-rteStyle-ImageArea" alt="CheckedOutFilesApplicationReport.png" src="CheckedOutFilesApplicationReport.png">
      <dd>Figure: One button reminds all users of their "Checked out Files"

    Hi Sophie,

    You have some pages checked out in SharePoint.

    1. You should check in at least daily. Revise our SSW rule on Frequent SharePoint Check-ins.
    2. If you are no longer editing these files, check them in!
    3. Reply to this email with something like: ‘Done - x files checked in’

    You currently have the following pages checked out:

            <font color="#3a66cc"><a href="/rules/do-you-confirm-there-is-no-checked-out-data">http://&lt;siteurl&gt;/DesignandPresentation/RulesToBetterVideoRecording/Pages/Default.aspx</a>  (parent folder)</font>

            <font color="#3a66cc"><a href="/rules/do-you-confirm-there-is-no-checked-out-data">http://&lt;siteurl&gt;/DesignandPresentation/RulesToBetterVideoRecording/Pages/testing-rule.aspx</a>  (parent folder)</font>

    Tip: See all files you have checked out at http://<siteurl>/_layouts/SSWReports/CheckedOutReport.aspx

    <As per rule>;

    -- Powered by SSW.Dory -- v16.1.7122.24300 Server: DESKTOP-C7SF4A3

    Figure: An example of the reminder email that all users receive **


We open source. Powered by GitHub