Sunday, February 10, 2013

Step by Step Procedure to Migrate sites from MOSS 2007 to SharePoint 2010 -


Hi All,

In this post, I will first explain how to migrate sites from MOSS 2007 to SharePoint 2010. 

Steps for Migrating MOSS 2007 site to SharePoint 2010

1.    We will migrate a simple site in MOSS 2007 to SharePoint 2010. Here is the screenshot of the site in MOSS 2007
         


2.      Set the content database for this site to READ ONLY before taking backup. 
       To do this, open SSMS and select the content database


















3.       Right click on database and select properties
4.       Under Options tab, set the database state to be READ ONLY as shown below
       

















5.    Once this is done, click OK to save changes. The database will be grayed out indicating that it is in READ ONLY mode





















6.       Now, backup the database


















7.    Once the backup is done, restore this backup on SQL Server that is connected to SharePoint 2010 Farm. I have SQL Server 2008 R2 that is connected to SP 2010 farm.
8.    To restore the MOSS 2007 content database to SQL Server 2008 R2, open your SQL Server 2008 R2 in SSMS
9.      Right click on Databases and select Restore database
10.   Select “From Device” option under “Source for restore”. Then Select the backup file




















11.   Provide the name of database under “Destination for restore” => “To database”. FYI, I restored my MOSS 2007 content database to SQL Server 2008 R2 as “WSS_Content_MOSS2007ContentDatabase”

12.   Now, go to central administration page for SharePoint 2010 and create a new web application. Do not create any site collections for this web application as we will delete content database for this web application. The name of content database for this web application is “WSS_Content_TempWebApp_4444”.












13.  Delete the content database for newly created web application (http://saiabhilash:4444/) using PowerShell command
      
      Dismount-SPContentDatabase -Identity "WSS_Content_TempWebApp_4444"

14.  Now, attach the MOSS 2007 content database to this web application using PowerShell command

Mount-SPContentDatabase -Name WSS_Content_MOSS2007ContentDatabase -DatabaseServer SAIABHILASH\SHAREPOINT -WebApplication http://saiabhilash:4444/

15.  Once this done, verify that the MOSS 2007 content database is successfully attached to SharePoint 2010 web application (Manage Content databases page in Central Administration)










16.  Depending on your project requirements, you may need to perform additional tasks
a.       Update Web.config with
                                                   i.      Connection strings to database (In case custom database is used)
                                                 ii.      Safe controls for Dll’s
b.      Update Visual Studio code to VS 2010 (Applicable if 12 hive was used by your code. This needs to updated to 14 hive)
c.       Update master page and page layouts to use dll’s of version 14.0.0.0. Note that we still have 12.0.0.0 version for Master page and Page layouts even after migration

17. This is it. Once this is done, we see the migrated site in SharePoint 2010 as shown below J













18.  We still see that UI is still in 2007 format. Use Visual Upgrade to see the updated UI (Site Actions è Visual Upgrade)














19.   Select “Update the user interface” tab and click OK to see SharePoint 2010 UI.


























20.   Welcome to SharePoint 2010! J














In next post, i will show you how to migrate sites from SharePoint 2010 to SharePoint 2013. Cheers !

13 comments:

  1. good stuff..very useful..thanq..

    ReplyDelete
  2. Glad that you liked my post..Happy Coding...:)

    ReplyDelete
  3. Very useful post.

    One question.... On step 14, can we use stsadm -o addcontentdb command instead of Mount-SPContentDatabase?

    Thanks,

    ReplyDelete
    Replies
    1. Yes.. But since stsadm is deprecated, I preferred powershell :-)

      Delete
  4. Hi. Will all my documents / files, list, meta data, content types, folder structures, etc be migrated using the procedures you provided

    ReplyDelete
    Replies
    1. Hi Andrew,

      Yes, the site will be migrated as is. However, you may need to customize UI since master pagein SP 2010 is different from MOSS 2007 :)

      Thanks.

      Delete
  5. Will all the SharePoint workflows(approval WF) associated with Lists will be migrated as is?

    ReplyDelete
    Replies
    1. Hi Srinivas,

      As far as OOB workflows are concerned, they will be migrated as is. Please see the below msdn link:
      https://social.technet.microsoft.com/Forums/en-US/a957a65b-87b7-45c5-9ef8-5f6425f8669c/migrate-sharepoint-designer-2007-workflows-to-sharepoint-designer-2010?forum=sharepointadminprevious

      For custom workflows, you may need to upgrade your solution to use latest DLL's.

      Please let me know if that is not the case.

      Thanks,
      Sai Abhilash

      Delete
  6. what if existing MOSS 2007 database is on SQL 2005 SP2 and moving to SQL 2008 - any special consideration requires?

    ReplyDelete
    Replies
    1. I think that should still work. Any specific issue you are facing?

      Delete
  7. Hello,

    Could you please let me know in which step we need to deploy custom solutions(WSP). Could you please confirm me the below steps.

    1. Backup 2007 database
    2. Restore in 2010 environment
    3. Create Web Application and delete the database which is newly created.
    4. Run Test-SPContent Database
    5. Attach the database to sharepoint.
    6. Deploy the custom solutions(WSP).

    But we may get error like missing assembly, missing web parts, missing setup files when we run Test-SPContentDatabase as we have not installed custom solutions and it will be deployed as the last step.

    Could you please confirm me above?

    Thanks in Advance.

    ReplyDelete