Wednesday, November 24, 2010

SharePoint 2007 to 2010 Migration

1. Run the preupgradecheck
psexec \\SP2007Server -u domain\UserID -p yourPWD -s stsadm -o preupgradecheck
Note: I used psexec sysinternal tool, felt easy working from my Pc rather than RDPing to the server

2. Based on Above check we have 2 options out of 4 options

1. In-place upgrade
○ Use existing hardware – servers/farm offline during upgrade
○ Configuration and all content upgraded
○ Farm-wide settings preserved
○ Customizations available after upgrade
○ Recommended for small or non-production environments

2. Database Attach upgrade
○ New hardware
○ Upgrade multiple DBs at a time
○ Server farm settings not upgraded
○ Customizations must be transferred
○ Can consolidate multiple farms into one
○ Recommended if farm level configurations are minimal

3. Hybrid 1: Read-Only Database upgrade
○ Use Database Attach upgrade to preserve existing farm
○ Existing farm is put in read-only mode
○ Create a new farm and attach all content databases
○ Server farm settings not upgraded
○ Recommended over Database Attach

4. Hybrid 2: Detach Database upgrade
○ Use in-place upgrade for farm settings to preserve configurations
○ Detach and upgrade content databases
○ Alternatively, upgrade content databases in a temporary farm
○ Recommended if farm level configurations are significant

3. Pre Upgrade check will give you possible options for you to migrate, I choose Content Database Attach.

4. Identifying the .WSP files to be removed, Clean up your current 2007 environment before you migrate, so that you have less things to worry.

a. Used Bamboo SharePoint Analyzer http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/11/06/introducing-bamboo-sharepoint-analyzer.aspx Choose where solution is used Option. To Identify Solutions and Features that have been deployed, displayed per Web App, Site Collection or Site scope
Now they even have client version, so you can run from your local PC.

5. Downloaded the STSADM Extender for automating the deleting away the unwanted web parts
Please Install the http://stsadm.blogspot.com/2007/10/set-web-part-state.html STSADM Extended commands to strip the web parts from the pages.
 
Download from:
SharePoint 2007 STSADM Extension WSP Files (SP2 is Recommended)
MOSS Only STSADM Extensions (x86, x64)
To install for the first time run the following commands (make sure you are in the directory where you downloaded the file):

stsadm -o addsolution -filename Lapointe.SharePoint.STSADM.Commands.wsp

stsadm -o deploysolution -name Lapointe.SharePoint.STSADM.Commands.wsp -immediate -allowgacdeployment

stsadm -o execadmsvcjobs


6. Stsadm -o gl-setwebpartstate -url "http://SP2007Server/default.aspx" -title "Un wanter WP Title like custom Events" -delete -publishUse the Excel sheet to generate the script for us.
You need Primarily 2 main fields Web Page & Display Web Part You get these 2 values from Bamboo Analyzer.
Formula to get script =CONCATENATE("stsadm -o gl-setwebpartstate -url """,[@[Web Page]],""" -title """,[@[Display Web Part]], """ -delete -publish")OR
Manually Strip web parts:
Find the pages then add the ?contents=1 to go to Manage Web part Page; then remove away the web parts & checked in those are checked out by other user(s) Note: Make sure you check out the Page.

7. Taking DB Offline on 2007 Env.
a. STSADM -o deletecontentdb –url "http://SP2007Server/" -databasename "WSS_Content" -databaseserver "SP\SHAREPOINT"

b. USE master
Go
ALTER DATABASE WSS_Content SET OFFLINE WITH
ROLLBACK AFTER 60 SECONDS

c. USE [master]
GO
EXEC master.dbo.sp_detach_db @dbname = N'WSS_Content',
@keepfulltextindexfile = N'true'
GO
8. My assumption is that you already have or created a new web application and site collection
Taking DB Offline on 2010 Env. (newly created site collection)
a. STSADM -o deletecontentdb –url "http://SP2010Server/" -databasename "WSS_Content_SP2010" -databaseserver "SP\SHAREPOINT"

b. USE [master]
GO
EXEC master.dbo.sp_attach_db @dbname = N'WSS_Content',
@filename1 =N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SHAREPOINT\MSSQL\DATA\SP2007\WSS_Content.mdf'
Note: You can user SQL Manager for attaching the DB, easy too!

c. Run Powershell script
i. Test-SPContentDatabase –name WSS_Content –WebApplication http://SP2010Server

For further identifying the migration issues you may encounter when you attach.

ii. New-SPContentDatabase -Name WSS_Content -WebApplication http://SP2010Server

1 comment:

Mike said...

There is HarePoint Analytics for SharePoint: the essential web-analytics solution for SharePoint-based sites and portals. More 50 reports, wide customisation, great features.
Homepage: http://www.harepoint.com/Products/HarePointAnalyticsForSharePoint/Default.aspx