Migrate from MOSS 2007 to SharePoint 2010 - Step by Step
In this article, I'm walking through Migrating from SharePoint 2007 to SharePoint 2010 using database attachment method.
stsadm.exe -o preupgradecheck
4. Repeat these steps to back up the databases that are used by MOSS 2007 in the environment.
stsadm -o deletecontentdb -url http://SharePoint.company.com -databasename <MOSS2007_Migration_Content>
Test-SPContentDatabase -Name <DatabaseName> -WebApplication <URL>
Delete the corrupted objects
stsadm -o databaserepair -url <URL of SharePoint site> -databasename <name of database> -deletecorruption
stsadm.exe -o addcontentdb -url http://SharePoint.company.com -databasename <MOSS2007_Portal_Content>
Overview
- Run Preupgradecheck in MOSS 2007 server.
- Analyze & Fix the issues.
- Take the back up of content database from MOSS 2007.
- Restore the content databases backup to SQL Server of SharePoint 2010.
- Create web application in SharePoint 2010.
- Attach the MOSS 2007 content databases to SharePoint 2010.
- Post Migration fixes
1. Run preupgradecheck in MOSS 2007 Server
This will be our primary analysis and reporting tool providing us with invaluable information regarding your SharePoint 2007 farm and actions that may be required to be taken prior to upgrading to SharePoint 2010. It is better to have October CU: http://support.microsoft.com/kb/976730/ where the preupgradecheck is enhanced further.
Run the preupgradecheck as below in command prompt:
stsadm.exe -o preupgradecheck
Once you get "Operation completed successfully", it will launch the “SharePoint Products and Technologies Pre-Upgrade Check Report”. It can also be located under the following location;
1(a). Analyze the report and Fix the following settings:
- I would strongly recommend you to document your current environment first! see 25 Things to Document before You Start SharePoint Migration
- Identify any third party components used and deploy them to SP2010. E.g. Nintex, 3rd party features, including web parts, solutions and custom workflows
- Setup Incoming/Outgoing email settings in SP2010 environment
- Modified Web.Config entries
- Alternate Access Mappings (AAM)
- Replicate Quota templates & Managed Paths to SP2010
- Fix Event Receivers: Fix "Event Receivers Missing" issue in SharePoint Migration
- Fix missing web parts Fixing "Missing Web Parts" issue in Migration
- Fix missing features Fix "Features Missing" issue in SharePoint Migration
- Find and Delete Orphaned Users
- Empty Recycle Bins Empty SharePoint Recycle Bins Programmatically with PowerShell
- Check-in All the checked out files
- Fix orphaned sites: Find and Delete Orphaned site collections in SharePoint
- Limit and Cleanup Versioning
- Trim Audit log Trim audit log to Improve Performance
- Delete Closed Web Parts: Closed Web Parts in SharePoint - How to Find, Restore and Delete
- Fix “Content database with modified database schemas” issue when upgrading to SharePoint Server 2010 : http://sharepointnomad.wordpress.com/2010/12/12/fix-content-database-with-modified-database-schemas-issue-when-upgrading-to-sharepoint-server-2010/
2. Take the Content Database Backup from MOSS 2007
Set the database to read-only before taking backups.
Set the database as read only:
- On the MOSS 2007’s database server, click Start, point to All Programs, Microsoft SQL Server, and then click SQL Server Management Studio.
- Traverse to Databases node by expanding the tree.
- Right-click the name of the database that you want to set to read-only, and then click Properties.
4. In the Properties dialog box, click the Options tab.
5. Under State, select the Database Read-only to True, and then click OK
Backup the database:
Follow these steps to take back-up:
- Traverse to Databases node by expanding the tree.
- Right-click the database you want to back up, point to Tasks, and then click Backup Database
4. Repeat these steps to back up the databases that are used by MOSS 2007 in the environment.
3. Restore the back up on SharePoint 2010’s SQL Server:
- Open the SQL Server Management studio, traverse to “Databases” node. Then right click the “Databases” node and choose “Restore Database…” from the context menu.
- Specify the Database name, Restore Source, Destination, File names in the screens.
4. Create web application in SharePoint 2010
- In the SharePoint Central Administration, click on “Application Management” and click on “Create or extend Web application” under “SharePoint Web Application Management”.
- Again click on “Create Web application”. Set the settings according to the needs say http://SharePoint2010.company.com
- Don’t create any site collection.
- Install & Copy the solutions, file system changes (like images, themes) from MOSS 2007 to MOSS 2007 servers.
Remove content database of the newly created web application in SharePoint 2010
Now, we need to delete the content db of the newly created web application in order to avoid any URL conflicts. Run the below stsadm command:
stsadm -o deletecontentdb -url http://SharePoint.company.com -databasename <MOSS2007_Migration_Content>
5. Attach restored database with the newly created web application in SharePoint 2010
Test the content database
Before attaching the content databases to the Web applications, use the Test-SPContentDatabase PowerShell cmdlet to verify that all of the custom components that you need for that database. It checks for all artifacts such as feature, setup files, web parts,etc that are referred in the content database are installed in the farm and provide you with an report.
Test-SPContentDatabase -Name <DatabaseName> -WebApplication <URL>
Delete the corrupted objects
stsadm -o databaserepair -url <URL of SharePoint site> -databasename <name of database> -deletecorruption
Finally, we need to attach the restored MOSS 2007 database to MOSS 2007 by running the STSADM
- The Content DB containing the root site collection is always applied first.
- The other content DBs can be applied in any order.
Important:
Attach the Content DB of the Root Site collection First. And then Attach the Content DBs of other Site Collections.
stsadm.exe -o addcontentdb -url http://SharePoint.company.com -databasename <MOSS2007_Portal_Content>
Or you can use the PowerShell cmd-let: Mount-SPContentDatabase
Mount-SPContentDatabase -Name-DatabaseServer -WebApplication
Post Migration fixes
Once the content database attachment process is over, we have to manually fix the below things:
- Fix the List/Site templates: Migrating SharePoint 2007 Site/List Templates(.stp) into SharePoint 2010
- Remove any unused/classic web parts Remove a Webpart programmatically using PowerShell
- Fix the alerts: Fix Alerts after URL Change in SharePoint Migration
- Fix Incoming E-mail settings: Find All Incoming E-Mail Enabled Lists and Libraries in SharePoint
- Fix InfoPath form URLs: Migrate InfoPath Forms to SharePoint 2010
- Perform the Visual upgrade to get the SharePoint 2010 Look and Feel if needed. Visual Upgrade All Sites in a web application Using PowerShell
Unit Test:
Browse the migrated sites in SharePoint 2010 and check their look& feel and functionality.
Before and After:
Last but not least: How to Migrate from SharePoint 2007 to SharePoint 2013? Well, if you use Out-of-box database attachment method, you need to migrate to SharePoint 2010 first and then migrate to SharePoint 2013. Here is my another article Migrate from SharePoint 2010 to SharePoint 2013 - Step by Step Or you can use Migration tools to directly migrate from SharePoint 2007 to SharePoint 2013 or SharePoint 2016!
References:
Last but not least: How to Migrate from SharePoint 2007 to SharePoint 2013? Well, if you use Out-of-box database attachment method, you need to migrate to SharePoint 2010 first and then migrate to SharePoint 2013. Here is my another article Migrate from SharePoint 2010 to SharePoint 2013 - Step by Step Or you can use Migration tools to directly migrate from SharePoint 2007 to SharePoint 2013 or SharePoint 2016!
References:
- Tech-net guide - Perform a database attach upgrade: http://technet.microsoft.com/en-us/library/cc303436.aspx
- Resolving Migration issues: http://technet.microsoft.com/en-us/library/cc262967.aspx
Migrate from MOSS 2007 to SharePoint 2010 - Step by Step
Reviewed by Unknown
on
September 19, 2011
Rating:

Good Work.
ReplyDeleteThis is an excellant post
ReplyDeleteNice detailed article. Thanks for posting.
ReplyDeleteReally Good One
ReplyDeleteits totally cool
ReplyDeleteits really great job
ReplyDeleteIt's really good job!............
ReplyDeletevery good article and help full!!!!!!!!!!!!!!!
ReplyDeleteExcellent job..
ReplyDeleteAwesome..
ReplyDeleteReally great job done.
ReplyDeleteNice work
ReplyDeleteVery helpful post.. It saved lot of my time
ReplyDeleteThanks for posting... Excellent article
ReplyDeleteI actually enjoyed reading through this posting.Many thanks...
ReplyDeleteEmail Database
Really very very good article
ReplyDeleteGreat Article.
ReplyDeleteBut, I have follow all if the steps , but my site collection is not displaying the content from sharepoint 2007. The database upgraded successfully and I can the mysites collection. The visual upgrade button is also grayed out.
What can I do to be able to see the data from the 2007 SP site?
Thanks
Hi Antonio,
DeleteIf Visual upgrade is grayed out, You can use PowerShell to upgrade your sites to SharePoint 2010 UI. Visual Upgrade All Sites in a web application Using PowerShell
Regards,
Sal
Excellent article..
ReplyDeleteWhy do we use tools to migrate instead of attaching and detach migration ? What is the difference can you explain please ?
Avinash,
DeleteI've conducted a research on SharePoint Migration products, Methods and compared their features. Refer this article to get your questions answered: SharePoint Migration Products Comparison
Regards,
Salaudeen Rajack
Its great Post with Details
ReplyDeleteReally good article, very nice presentation, got everything i was looking for, thanks millions :-)
ReplyDeleteA good article and very good presentation with details, got everything I was looking for, thanks millions for posting this article :-)
ReplyDeleteWorked like a charm ! Great post and keep posting nice articles.. :)
ReplyDeleteHi Salaudeen,
ReplyDeleteCan i migrate just a single site from SP2007 to SP2010 without tools ? If yes, how to do it ?
You can Move your existing site collection to New content database and Migrate that Content DB!
DeleteRefer here for: Move SharePoint Site collections between Content Databases
Very informative, thanks a lot for saving our time.
ReplyDeleteReally Help full article.
ReplyDeleteThanks buddy..really helpful article.
ReplyDeleteSalaudeen great collection thanks
ReplyDeleteReally excelent job done. Thanks a lot Salaudeen.
ReplyDeleteI am looking for another article after this process; "Upgrading to 2013".
As you know there isn't any direct path to upgrade from 2007 to 2013.
Excellent Post.
ReplyDeleteDid you ever get a chance to make a Good SharePoint DR Document? In same Premise or Remote Data Center?
Can you please help me ..... How to Migrate a SharePoint Site from 2007 to 2010 Using Server side coding / Power shell script
ReplyDeleteExcellent Articles......thank U
ReplyDeleteAppreciate your efforts, you have put in to write this post. Really nice n useful.
ReplyDeleteOnly thing missing is Item #4 under Step 4 - Install & Copy the solutions.
ReplyDeleteSome detail on that aspect is BADLY needed. We have some XSN files that go with InfoPath forms, and it is very unclear how to migrate those pieces. Thanks.
Hi
ReplyDeleteRecently I did migration from Moss 2007 to SharePoint 2010. Everything was done successfully, except one that is documents were not attaching to shared document but in 2007 it was working fine. 2) I added documents manually, when I was trying to open those documents I was getting error. that is...( Word Web App cannot open this document due to an unknown error. If the problem persists, try opening the file in Microsoft Word). Please guide me in a right way.
Thanks
If its happening ONLY with the particular document library/document, Chances could be: DB/Library got corrupted!
DeleteExplanation is very clear....Thanks
ReplyDeleteHello,
ReplyDeleteCould you please let me know in which step we need to deploy custom solutions(WSP) which needs to be deployed against web application.
Is it after attaching the content databases to sharepoint?
or
Before deleting the content database of newly created web application?
Thanks in Advance.
Deploy All custom solutions, 3rd party components, web parts before attaching databases!
DeleteIf the WSP file is deployed on web application in 2007 then how we can deploy the same solution in 2010 without web application.
ReplyDeleteEven if we are creating dummy web application(as per Step4) but we are going to delete content database associated with it. Please help me to understand.
Thanks in Advance.
Hi,
ReplyDeleteOn step #5 when you say deleted the corrupted objects --
stsadm -o databaserepair -url -databasename -deletecorruption
Do you mean the URL of new webapplication on sharePoint 2010 server or the old MOSS 2007 server.
Either!
DeleteHi, Very nice description about SharePoint Migration.
ReplyDeleteI like your web blog.Because whenever i come into your web blog
then i always get the new interesting and important information in your web blog.
Thank You
SharePoint Migration
Hi, I cannot delete the content db by your stsadm command it shows following errors
ReplyDelete1.The farm is unavailable
2.Object reference not set to an instance of the object