Friday, March 8, 2013

Migrate from MOSS 2007 to SharePoint 2010 - Step by Step


Overview
  1. Run Preupgradecheck in MOSS 2007 server.
    1.  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

stsadm.exe -o preupgradecheck Report
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\
SharePoint 2007 preupgradecheck Report

1(a).   Analyze the report and Fix the following settings:

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.Take the Content Database Backup from MOSS 2007

SQL Server 2005 Management Studio Splash Screen


  1. Traverse to Databases node by expanding the tree.
  2. 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
Set SharePoint Content Database to Read-Only

Backup the database:
Follow these steps to take back-up:
  1. Traverse to Databases node by expanding the tree.
  2. Right-click the database you want to back up, point to Tasks, and then click Backup DatabaseBackup SharePoint Content Database from SQL Server
 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.
Backup SharePoint Content Database from SQL Server

 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.Restore SharePoint 2007 Content Database to SharePoint 2010
  1. Specify the Database name, Restore Source, Destination, File names in the screens.
Restore MOSS 2007 Content Database to SharePoint 2010
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 say http://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> 

Remove SharePoint Content Database: stsadm -o deletecontentdb

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 MOSS 2007 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>

Attach Content Database to SharePoint

 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:

Unit Test:

Browse the migrated sites in SharePoint 2010 and check their look& feel and functionality. 
Before and After:
MOSS 2007 to SharePoint 2010 - Before and After Screen


Read more: http://www.sharepointdiary.com/2011/09/migrate-from-moss-2007-to-sharepoint.html#ixzz2MwVkVvt4



Step by step migration from MOSS 2007 to SPS 2010

Step1: Perform below task if required.

Upgrading SharePoint 2007 32 Bit to SharePoint 2007 64 Bit

By default, the SharePoint 2010 is available only in 64 bit mode. To be able to upgrade the SharePoint 2007 32 bit to SharePoint 2010, you will first need to upgrade your SharePoint 2007 32 bit to SharePoint 2007 64 bit if you are interested in migrating only some of the SharePoint sites. The stsadm command for taking a backup of a site stsadm –o backup –url <url of the SharePoint 2007 site> –filename <Path and file name of the backup file> you can also use –force switch to force the backup process in case of any issues.
Step 2: Create 64 Bit Moss Server
How to Install Office SharePoint Server 2007 SP1 on Windows Server 2008 R2
Well, you can’t do it out of the box, you need to slipstream the updates into the installer.  I have read lots of instructions including the official ones and I don’t think they are clear at all, so I’ll give it a shot.  These instructions are assuming you are installing on a 64-bit system, which most likely you are since R2 has no 32-bit version
What You Need
  • Installation bits of Office SharePoint Server 2007 SP1 (these are your installation files).  I have put these files in the following path: C:\Temp\RTM-Bits\Office SharePoint Server 2007 SP1
  • Installation bits of Windows SharePoint Services 3.0 SP1 (these are your installation files).  I have put these files in the following path: C:\Temp\RTM-Bits\Windows SharePoint Services 3.0 SP1
  • Windows SharePoint Services 3.0 x64 with Service Pack 2 (place the Sharepoint.exe folder on C:\temp)
  • The 2007 Microsoft Office Servers Service Pack 2 (SP2) (the 64-bit version, place the officeserver2007sp2-kb953334-x64-fullfile-en-us file.exe on C:\temp)
What needs to be done
  1. Extract the WSS files by typing: c:\temp\SharePoint.exe /extract:”C:\temp\WSS\Updates”
  2. Open the C:\temp\WSS\Updates folder, select all files and copy them
  3. Open the C:\Temp\RTM-Bits\Windows SharePoint Services 3.0 SP1\x64\Updates and paste all files (merge and replace)
  4. Extract the MOSS files by typing: c:\temp\officeserver2007sp2-kb953334-x64-fullfile-en-us.exe /passive /extract:”C:\temp\MOSS\Updates”
  5. Open the C:\temp\MOSS\Updates folder, select all files and copy them
  6. Open the C:\Temp\RTM-Bits\Office SharePoint Server 2007 SP1/x64\Updates and paste all files (merge and replace)
Step 3: Backup and Restore
Taking the version backup of a site collection:
stsadm.exe -o backup -url “http://localhost/&#8221; -filename “D:\Sharepoint Backups\My backup\backup.dat” -backupmethod full
Restoring the version backup of a site collection:
The web application should be present and running for restoring the site collection.
stsadm.exe -o restore -url “http://localhost/&#8221; -filename “D:\Sharepoint Backups\My Backup\backup.dat” -restoremethod overwrite
Your 64 Bit moss Version will be ready to migrate into Sharepoint 2010.
Step 4: Determining how to handle customizations
Although customizations for SharePoint come in many forms (Site templates , Site definition, Feature, Workflows and server controls, Event handler, Web Parts, Master pages and CSS files, etc.)  I would like to focus now on the compiled code. There were many questions I have read on Forums and Blogs about “Do we have to recompile or rewrite the code for a migration to SharePoint 2010?”.  I have found several answers and the good news is that in many cases neither rewriting the code nor even recompile it won’t be necessary. But I would like to display two excerpts of the Microsoft documentation that illustrates what you have to deal with:
Excerpt 1: Existing applications
You must recompile existing 32-bit applications and custom assemblies (for example, Web Parts and event receivers) to run on the 64-bit architecture because the 64-bit edition of SharePoint cannot load a 32-bit assembly. Before you recompile existing applications or custom assemblies, verify that they are compiled to run on both architectures. If this is the case, do not compile them for a single architecture. (In Microsoft Visual Studio this build option is Any CPU.)
If the existing applications are third-party applications, check with the third-party vendor regarding 64-bit versions and compatibility. In the case of custom contracted solutions for which you do not have the source, verify the solutions in a test 64-bit environment to ensure compatibility.
Excerpt 2 : Obsolete Classes and Namespaces
Because the changes to the API in the upgrades are backward compatible, you should not have to make any changes to your Windows SharePoint Services 3.0 or Office SharePoint Server 2007 custom solutions before you redeploy them in either SharePoint Foundation 2010 or SharePoint Server 2010. Some classes and namespaces are obsolete, but they will continue to work as expected. If you want to start upgrading your applications so that they use the most current classes and methods, recompile your code. The compiler warnings will tell you which elements of the object model are obsolete, and which newer alternatives you should use. Figure 3 shows an example compiler warning and the corresponding mouse-over warning in Visual Studio 2010.
 Step 5: Redeploying Customizations and Solutions in SharePoint Foundation 2010 and SharePoint Server 2010
You can deploy a dll compiled for MOSS 2007 using the “Any CPU” or x64 build option on a SharePoint 2010 server and it will work using the 64-bit process, but if you want an optimized code you should recompile it with the new SharePoint 2010 object model. So in many case it won’t be necessary to recompile but it is recommended to do it to optimize your code and to learn the new SharePoint 2010 object model. 
Other customization
Looking to the table listing the different kinds of customizations and the migration impact on it, presents in the Microsoft documentation, I see 4 main important areas to review:
  1. Information architecture – sites provisioning
    Site definition and site templates
    Managed paths (inclusions/exclusions)
  2. Look and Feel – UI Experience
    Themes
    Toolbar actions
    Master pages and CSS files
  3. Custom code
    Workflows and server controls
    Event handler
    Web Parts
    Services
    Authentication providers
    Search provider or security trimmer
    JavaScript
  4. Features
Step 6:  Before migrate content DB to sharepoint server 2010 make sure below steps:
  1.   SQL server version both end must be same (Update Version if required)
  2.   Database backup version must be same. (Got to Version table under table tab and update appropriate version)
Step 7:  Migrate the Content database of MOSS 2007 to Sharepoint 2010.
Attach the Content DB to SharePoint 2010 Application
The process of attaching the content DBs in the SharePoint 2010 Web Application should be done through STSADM tool. For Attaching the Content DB to a SharePoint 2010 Web application, you should perform the tasks in the following order:
  1. Restore the Content DBs to New SQL Server Instance
  2. Delete the existing content DB of the Web application
  3. Attach the Content DB of the Root Site collection
  4. Attach the Content DB of other Site / Site Collections if any
  5. perform an IISRESET
  6. Open the SharePoint 2010 Web Application
  7. Perform the Visual upgrade to get the SharePoint 2010 Look and Feel
Upgrade My Site
To upgrade the My Site to SharePoint 2010, you should perform the following activities
  1. Configure the My sites in SharePoint 2010
  2. Perform the Content DB attachment method as discussed earlier

Migrating from MOSS 2007 to SharePoint 2010

Migrating from Moss 2007 to SharePoint 2010 has left many in the past scratching their heads in frustration. Well scratch no more, for we are about to provide you with a simple method to complete the migration using In-Place Upgrade.
So, you may ask, what are the pros and cons of migrating using In-Place Upgrade?
In-Place Upgrade Pros:
1. Make use of previously existing hardware.
2. There’s no longer need to change any settings as they’ll remain the same.
3. Customizations will also remain unchanged.
In-Place Upgrade Cons:
4. User may experience extended downtime.
5. In-place upgrade can only finish its migration in one operation for all the
servers in the Moss 2007 platform.
6. Existing farm must meet the SharePoint2010 requirements.
First let’s check to make sure your current SharePoint environment Moss 2007 meets the requirements of the In-Place Upgrade.
SharePoint Server OS Requirements:
Windows Server 2008 Standard (64-bit), Enterprise, Data Center, or Web Server with SP2, Windows Server 2008 R2 Service Pack1 (SP1) Standard (64-bit),Enterprise, Data Center, or Web Server, if you are running Windows Server 2008 without sp2, the Microsoft SharePoint Products Preparation Tools installs Windows Server 2008 SP2 automatically.
Database Version Requirements:
1. Microsoft SQL Server 2008 R2 (64-bit), Microsoft SQL Server 2008 with Service Pack (SP1) and Cumulative Update2 (CP2).
2. Microsoft SQL Server 2005 (64-bit) with Service Pack3 (SP3).
Now that you’ve confirmed that your current environment meets the requirements of the In-Place Upgrade, the following steps will teach you how to complete the upgrade in the following clearly defined steps.
1. Start by creating a MOSS 2007 site as shown in the following screenshot.

My site in MOSS 2007
2. We need to add data as well as add custom configuration in the site to verify after you complete your upgrade toSharePoint 2010.
3. Install the SharePoint Server 2010 directly on the existing SharePoint 2007 Server. In the Setup window, we can view the hardware and software requirements, installation guide, etc.
Let’s skip this part and proceed straight to the installation.

SharePoint Server installation screen
4. Select Install software prerequisites. You may already have all the required components in Moss 2007, but to be sure, we’ll select this option.
The Products Preparation Tool will check the required components for the current server, and then install any if necessary.

Preparation Tool window
5. Click Next and accept the license terms. The Preparation Tool will then immediately start updating the server.

Installation preparation windows
6. After this configuration completes, the following screen will be displayed and you will be requested to reboot your system.

Preparation Tool Summary Screen
7. When the computer reboots, the Preparation Tool will launch again, finishing the rest of the steps.
Now our system is ready to install SharePoint Server 2010. Select Finish from the setup pane.
8. Enter the Product Key.

Product Key Window in SharePoint 2010 Setup
9. Read and accept the license terms.The next screen informs you that MOSS 2007 has been detected.

SharePoint Server 2010 Setup Screen – the Upgrade Window
10. As advised in the screen above, we need to run the stsadm command to ensure our MOSS 2007 site can be successfully migrated. Open cmd.exe console in Administrator Mode.

Start – Cmd.exe in Administrator mode
11. Navigate to the MOSS 2007 Bin directory, which is located by default at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN directory

Cmd Window in the MOSS 2007 Bin folder
12. Enter stsadm – opreupgradecheck
This command does not perform any repairsbut only checks for and reports issues with possible solutions to apply before the migration. As the command executes, we see the output continuously changing on the screen with different status notifications. You will eventually see“Aborted due to internal error”. Ignore this for now as the overall check will prove to besuccessful.

Stsadmpreupgradecheck output
The browser will open to display the html document with the summary of the output and details of every issue. All components should pass the test meaning it is now ready for the migration.
13. Go back to SharePoint Server 2010 Setup Window and clickInstall Now.
After the installation, the final screen informs you that you must launch the SharePoint Configuration Wizard in order to update our content to the latest SharePoint Version.

SharePoint 2010 Installation Summary screen
14. Click Close to run SharePoint Configuration wizard.
If you were expecting a wizard similar to the SharePoint 2007 Wizard, you may be disappointed. We now have an entirely new environment for SharePoint 2010 version and hence a new Configuration Wizard.

SharePoint 2010 Configuration Wizard
15. Click Next. Following this, the below warning will be shown.

Warning Window in SharePoint 2010 Configuration Wizard
16. Click Yes and you will see a new feature of SharePoint 2010 - Farm Passphrase.

Farm Security Settings Window
17. The Farm Passphrase will prevent server administrators from changing any data in our SharePoint 2010installation when no password is provided. Administrations won’t be able to use content or be able to configure databases even if full database backups are obtained.
Enter a password and continue with the configuration.
The next step is the Visual Upgrade.

Visual Upgrade Window
Now you can decide how your SharePoint site looks and feels. This enables you to upgrade your entire farm to theSharePoint 2010 visual experience. In order to ensure that everything will run fine in 2010 before modifying the design, do not do this in this demonstrationSharePoint Server 2010 allows you to preview the look and feel of sites before switching to the new SharePoint design.
18. Select “Preserve the look and feel of existing SharePoint sites” option, which will maintain the originalSharePoint Server 2007 design.
19. Review your settings at the Summary Screen and then click Next to start the farm configuration.

SharePoint 2010 Configuration Wizard Summary Window
20. In general, if there is no error the Configuration Successful window will appear. This signifies the upgrade is finished.
In the case of my configuration progress, I must open Central Administration to complete upgrading the timerjob.

Configuration Wizard Setup Finished Screen
The dialogue reads “The upgrade has not completed yet”. Continue to the next page.

SharePoint Server 2010 Upgrade Status page
Now let’s have a look at the newly migrated site.

Our upgraded site on SharePoint 2010
Since we have chosen to preserve the original ShrarePoint 2007 design, the site looks identical to the site prior to migration (except for the large Give Feedback button).
We can now preview the new layout. In the Site Actions menu, select Visual Upgrade.

Site Actions Menu
The configuration window will open, where you can select the site’s generic options, such as the titledescription,logo and the template.

Site Settings Window
21. Under the Visual Upgrade option, select “Preview the new SharePoint user interface“. This allows us to view the site with the SharePoint 2010 design with the option to revert back to the SharePoint 2007 layout if any errors occur.
Click OK to view the results.

Site Preview of the SharePoint 2010 Design
Here you can view the new layout where it should work just as expected.
22. From here, go back to the Visual Upgrade option to finish the migration completely.

Site settings screen – we’ve selected Use the New SharePoint User Interface option.

No comments:

Post a Comment