In this article, I'm walking
through Migrating from MOSS 2007 to SharePoint 2010 using database attachment
method.
Overview
1.
Run Preupgradecheck in
MOSS 2007 server.
a.
Analyze & Fix
the issues.
2.
Take the back up of
content database from MOSS 2007.
3.
Restore the content
databases backup to SQL Server of SharePoint 2010.
4.
Create web application
in SharePoint 2010.
5.
Attach the MOSS 2007
content databases to SharePoint 2010.
6.
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;
%COMMONPROGRAMFILES%\Microsoft
Shared\Web Server Extensions\12\Logs\
1(a).
Analyze the report and Fix the following settings:
· Identify any third party components
used and deploy them to SP2010. E.g. Nintext, 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 & Included paths to SP2010
· Fix Event
Receivers: http://salaudeen.blogspot.com/2011/08/fix-missing-event-receivers-issue-in.html
· Fix missing web
parts http://salaudeen.blogspot.com/2011/08/fixing-missing-web-parts-issue-in.html
· Fix missing
features http://salaudeen.blogspot.com/2011/08/fix-features-missing-issue-in-migration.html
· 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:
1.
On the MOSS 2007’s
database server, click Start, point to All Programs, Microsoft SQL Server, and
then click SQL Server Management Studio.

2.
Traverse to Databases node
by expanding the tree.
3.
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:
1.
Traverse to Databases node
by expanding the tree.
3. In the SQL
Server Backup dialog box, specify a name for the backup, select Back-up type -
Full, select a destination, and then Click OK to start the backup process.
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:
1.
Open the SQL Server
Management studio, traverse to “Databases” node. Then right click the
“Databases” node and choose “Restore Database…” from the context menu.

2.
Specify the Database
name, Restore Source, Destination, File names in the screens.
3. Click “OK” to start
the restore operation and Wait for the restore to complete! The time of
restoring database depends upon the database size and server’s capacity.
4. Create web
application in SharePoint 2010
1.
In the SharePoint
Central Administration, click on “Application Management” and click on “Create
or extend Web application” under “SharePoint Web Application Management”.
2.
Again click on “Create
Web application”. Set the settings according to the needs sayhttp://SharePoint2010.company.com
3.
Don’t create any site
collection.
4.
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.
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 SharePoint 2010 by running the STSADM
1.
The
Content DB containing the root site collection is always applied first.
2.
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 <DatabaseName>
-DatabaseServer<ServerName> -WebApplication<URL>
Post Migration fixes
Once the content
database attachment process is over, we have to manually fix the below things:
· Fix the List/Site templates: http://salaudeen.blogspot.com/2011/09/migrating-sharepoint-2007-sitelist.html
· Remove any un-used/classic web parts http://salaudeen.blogspot.com/2011/08/remove-webpart-programatically.html
· Fix Incoming E-mail settings: http://salaudeen.blogspot.com/2011/06/find-all-incoming-e-mail-enabled.html
· Fix InfoPath form URLs: http://salaudeen.blogspot.com/2011/03/migrating-infopath-forms-to-sharepoint.html
· Perform the Visual upgrade to get the SharePoint
2010 Look and Feel if needed.
Unit Test:
Browse the migrated
sites in SharePoint 2010 and check their look& feel and
functionality.
Before and After:











