Monday, September 13, 2010

MOSS 2007 web site migration In SharePoint 2010

Introduction: Number of hurdles are faced while migrating a MOSS 2007 site to SharePoint 2010 site.

They can specially cumbersome if you are SharePoint novice. In this blog I have explained the walkthrough for migrating a MOSS 2007 site to SharePoint 2010 site.

Step1: Find the content database name of your site for doing

"Central Administration ->> Application Management ->> Contents Databases".

Step2: Go to "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Your site database name" and Copy database files .mdf and .ldf . Before you copy these files please stop SQL services.

Or You could alternatively take contents db database backup (.bak) of MOSS2007 site using SQL Server Management Studio 2005.

Step3: Restore your MOSS2007 content database or Attach your database files (.mdf and .ldf) using SQL Server Management Studio 2008 r2 or create new database and restore .bak file.

Copy your MOSS2007 content database database files (.mdf and .ldf) in " C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA".

Open SQL Server Management Studio 2008 r2 and Enter credential.

Right Click on "Database" and select Attach option.

New window popsup then select ADD button.

Select your mdf and ldf files and press OK.

Now Your database is attached.

Step4: Create new Web Application on Share Point 2010.

Open Central Administration.

Select Application Management. Then Select "Manage Web Application" under Web Application section.

Select New from top ribbon bar.

Enter port number, web application name and press OK.

After creation of Web Application remove the Content Database from the new web Application. Go to "Central Administration" then Click on "Manage Content Database"

Select your web application and then Click on Database name.

After open the content database setting page, change Database Status "Ready" to "offline".

Check "Remove Content Database" option.

After checking this option you get on popup and select "OK" then click on "OK".

Step5: Now use STSADM to add MOSS 2007 content db to this web application. I am using the Microsoft "Share Point 2010 Management Shell" follow following links,

Open Share Point 2010 Management Shell -Start ->> All Programs ->> Microsoft Share Point 2010 Products ->> Share Point 2010 Management Shell.

Step6: Type command

stsadm -o addcontentdb -url http://b2b-shp10-dev:7000/ -databasename "WSS_Content_4784ff3a970149c292fe23be30d56424"

Step7: If your old database version and new database version are same then your database successfully attached if not then you can get following error.

Step8: Then go to your SQL Server management studio and Type following query for updating version of your database.Use suggested verion by screen or higher .

UPDATE [WSS_Content_4784ff3a970149c292fe23be30d56424].[dbo].[Versions]

SET [Version]='' WHERE[VersionId]='00000000-0000-0000-0000-000000000000'

Check version using select command

Step9: Re-executes the stsadm command.

Step10: If you get error like "Upgrade Completed with error...." then ,Redeploy all custom web parts.

Step11: Open Site in Browser.

Step12: It shows old User Interface. For new Share Point 2010 user interface follow following steps

Go to "Site Action ->> Site settings"

Select "Visual Upgrade" under the "Site Collection Administration" section

Select "Update all Sites" option

After that you can see new User Interface(UI) on your screen

Hope this information help you.



  1. it was very helpful........i was actually able to migrate my site from MOSS 2007 to SharePoint 2010.....Thanks alot

  2. This comment has been removed by the author.

  3. what a angle document .thank you
    u saved me a lot ...keep on posting