Upgrade from SP 2007 to SP 2010 & Detach content databases

A. Performing SQL Server Database Maintenance
A. 1. Clean up databases
  1. Log on to SP2007-WFE1 as CONTOSO\Administrator with the password.
  2. Click Start, click All Programs, click Microsoft SQL Server 2008 R2, and then click SQL Server  Management Studio.
  3. Click Connect.
  4. Click File, click Open, and then click File.
  5. Select D:\files\DefragIndexes.sql, and then click Open.
  6. In the Available Databases, list on the toolbar, select WSS_Content-Intranet.
  7. Click Execute. When the query is complete, the status below the Results panel indicates Query executed successfully. You may have to expand the results window to see the results.
  8. Repeat steps 6-7 for the following databases. When you are finished, close the SQL Server Management Studio.
    • WSS_Content_Intranet_IT
    • WSS_Content_Mysites
    • Sharepoint_AdminContent_Guid
    • Sharepoint_Config
     A. 2. Confirm sufficient free disk space

    1.  Click Start, and then click Computer
    2. Confirm that there is at least 20 gigabytes of free disk space on C drive.
    3. Close the Windows Explorer window that displays the Computer folder.

    B. Moving a Site Collection Between Content Databases
    B.1.  Create a new site collection
    1.  Click Start, click All Programs, click Microsoft Office Server, and then click Sharepoint 3.0 Central Administration. If prompted for credentials, provide Contoso\Administrator and the password.
    2. Click the Application Management tab.
    3. In the Sharepoint Site Management section, click Create site collection.
    4. In the Web Application section, ensure that http://intranet.contoso.com/ is selected.
    5. In the Title box, type Sales.
    6. In the URL box, type Sales.
    7. In the Primary Site Collection Administrator section, in the User name box, type CONTOSO\SP_Admin, and then click OK.
    B.2.  Create a new content database

    1.  In the Quick Launch, click Application Management.
    2. In the Sharepoint Web Application Management section, click Content Databases.
    3. Click Add a content database.
    4. In the Database Name box, type WSS_Content_Intranet-Sales, and then click OK.

    B.3.  Move a site collection between content databases
    1. Open Command Prompt.
    2. To export an Extensible Markup Language (XML) listing of sites in the intranet Web application, type the following command and press ENTER:

      "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin\stsadm.exe" -o enumsites -url http://intranet.contoso.com>
      C:\Sitelist.xml
    3. To open the site listing in Notepad, type the following command and press ENTER:
      notepad C:\sitelist.xml
    4.  Delete the following two elements (the entire line of XML):
      • Site Url="http://intranet.contoso.com"
      • Site Url="httpL//intranet.contoso.com/sites/IT"
        Confirm that the only remaining Site element is for the Sales site collection.
       
    5. Click File, and then click Save.
    6. Close Notepad.
    7.  Switch to Administrator: Command Prompt.
    8. To move the Sales site collection from the WSS_Content-Intranet content database to the WSS_Content_Intranet_Sales content database, type the following command and then press ENTER:
      "C:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\12\Bin\stsadm.exe" -o mergecontentdbs -url http://intranet.contoso.com - sourcedatabasename WSS_Content_Intranet -destinationdatabasename WSS_Content_Intranet_Sales -operation 3 -filename C:\SiteList.xml
    9. To restart Internet Information Services (IIS), type the following command:
      iisreset

    B.4.  Verify and report the move of the site collection.
    1. Switch to Internet Explorer. Press F5 to refresh the page.
      If the Windows Security dialog opens, type Contoso\Administrator in the User name box, type its password in the Password  box, and then click OK.
    2. Observe that the WSS_Content_Intranet_Sales content database now contains one site.
    3. Switch to Administrator: Command Prompt.
    4. To export an XML listing of sites in the intranet Web application, type the following command:
      "C:\Program Files\Common Files\Microsoft Shared\Wen Server Extentions\12\Bin\stsadm.exe" -o enumsites -url http://intranet.contoso.com>
      C:\siteList.xml
    5. To open the site listing in Notepad, type the following command:
      notepad C:\Sitelist.xml
    6. Click Format, and then click Word Wrap.
    7. Observer the information that is reported for each site collection, including the owner (primary site collection administration), content database, and storage utilization.
    8. Close Notepad.
    9. Close the command prompt.
     
C. Preparing SQL Server Databases for Upgrade.
C. 1. Back up Sharepoint Databases using SQL Server.

  1. Open Windows Explorer and browse to C drive.
  2. On the toolbar, click New Folder.
  3. Type Backups, and then press ENETR.
  4. Click Start, click All Programs, click Microsoft SQL Server 2008 R2, and click SQL Server Management Studio.
  5. Click Connect, click New Query.
  6. Type the following query into the query editor panel:
    use WSS_Content_Intranet
    dbcc shrinkfile ('WSS_Content_Intranet')
    dbcc shrinkfile ('WSS_Content_Intranet_log')
    go
    backup database WSS_Content_Intranet to disk = 'C:\Backups\WSS_Content_Intranet.bak'
    go
    backup log WSS_Content_Intranet to disk = 'C:\Backups\WSS_Content_Intranet_log.bak'
    go
    dbcc shrinkfile ('WSS_Content_Intranet')
    dbcc shrinkfile ('WSS_Content_Intranet_log')
    go
  7. Click the Execute button.
  8. Confirm that at the bottom of the Results panel, the status indicates Query executed successfully.
  9. Repeat the preceding steps to back up and truncate the WSS_Content_Intranet_IT database. Use the following query:
    use WSS_Content_Intranet_IT
    dbcc shrinkfile ('WSS_Content_Intranet_IT')
    dbcc shrinkfile ('WSS_Content_Intranet_IT_log')
    go
    backup database WSS_Content_Intranet_IT to disk = 'C:\Backups\WSS_Content_Intranet_IT.bak'
    go
    backup log WSS_Content_Intranet_IT to disk = 'C"\Backups\WSS_Content_Intranet_IT_log.bak'
    go
    dbcc shrinkfile ('WSS_Content_Intranet_IT')
    dbcc shrinkfile ('WSS_Content_Intranet_IT_log')
    go
  10. Repeat the preceding steps to back up and truncate the WSS_Content_Intranet_Sales database. Use the following query:
    use WSS_Content_Intranet_Sales
    dbcc shrinkfile ('WSS_Content_Intranet_Sales')
    dbcc shrinkfile ('WSS_Content_Intranet_Sales_log')
    go
    backup database WSS_Content_Intranet_Sales to disk = 'C:\Backups\WSS_Content_Intranet_Sales.bak'
    go
    backup log WSS_Content_Intranet_Sales to disk = 'C"\Backups\WSS_Content_Intranet_Sales_log.bak'
    go
    dbcc shrinkfile ('WSS_Content_Intranet_Sales')
    dbcc shrinkfile ('WSS_Content_Intranet_Sales_log')
    go
  11. Repeat the preceding steps to back up and truncate the WSS_Content_MySites database. Use the following query:
    use WSS_Content_MySites
    dbcc shrinkfile ('WSS_Content_MySites')
    dbcc shrinkfile ('WSS_Content_MySites_log')
    go
    backup database WSS_Content_MySites to disk = 'C:\Backups\WSS_Content_MySites.bak'
    go
    backup log WSS_Content_MySites to disk = 'C"\Backups\WSS_Content_MySites_log.bak'
    go
    dbcc shrinkfile ('WSS_Content_MySites')
    dbcc shrinkfile ('WSS_Content_MySites_log')
    go
  12. Open the C:\Backups folder. 
  13.  Confirm that the database and log backup files were created.
  14.  Close the C:\Backups folder. 
  15. Close SQL Server Management Studio. When prompted to save your changes, click No
C. 2. Back up a Sharepoint 2007 farm using Central Administration
  1. Switch to Sharepoint 3.0 Central Administration.
  2. In the Quick Launch, click Operations.
  3. In the Backup and Restore section, click Perform a backup.
  4. Select the check box next to Farm.
  5. Click Continue to Backup Options.
  6. In the Backup location box, type C:\Backups.
  7. Do not perform a backup at this time. Click Cancel.
C. 3. Detach content databases

  1. In the Quick Launch, click Application Management.
  2. In the Sharepoint Web Application Management section, click Web application list.
  3. Click Sharepoint - intranet.contoso.com80.
  4. In the Sharepoint Web Application Management section, click Content Databases.
  5. Click the database name of the first-listed content database.
  6. Select the Remove content database option. A confirmation message appears.
  7. Click OK.
  8. Click OK. The content database is removed.
  9. Repeat steps 5-8 for each content database.
  10. Repeat steps 1-9 for the Web application Sharepoint - mysites.contoso.com80.
  11. Close Sharepoint 3.0 Central Administration.
D. Preparing Sharepoint 2007 for Upgrade
D. 1. Perform a preupgrade check
  1. Open Command Prompt.
  2. Type the following command, and then press ENTER.
    "C:\program files\Common files\Microsoft Shared\Web Server Extentions\12\Bin\stsadm.exe" -o preupgradecheck
    A report opens to Windows Internet Explorer.
  3. Switch to Command Prompt.
  4. Review the output of the command.
  5. Switch to Internet Explorer.
  6. Review the report.
  7. Close all open the windows and applications.
E. Upgrading Sharepoint 2007 to Sharepoint 2010
E. 1. Run the Sharepoint Products Configuration Wizard
  1. Log on to SP2007-WFE1 as CONTOSO\Administrator with the password.
  2. Click Start, point to All Programs, click Microsoft Sharepoint 2010 Products, and then click Sharepoint 2010 Products Configuration Wizard.
  3. On the Welcome to Sharepoint Products page, click Next. A message appears to inform you that services may have to be started or reset.
  4. Click Yes.
  5. On the Specify Farm Security Settings page, type Sharepoint_2010 in the Passphrase and Confirm passphrase boxes.
  6. Click Next.
  7. On the Visual Upgrade page, review the message and options.
  8. Click Preserve the look and feel of existing Sharepoint Sites, and allow end users to upgrade their sites' user experience.
  9. Click Next.
  10. On the Completing the Sharepoint Products Configuration Wizard page, click Next.
    A Sharepoint Products Configuration Wizard message opens. The message reminds you to install the binaries on all servers in the farm before you run the wizard.
  11. Click OK.
  12. On the Configuration Successful, Upgrade in progress page, read the message, and then click Finish. Sharepoint 2010 Central Administration opens.
E. 2. Validate the upgrade
  1. In Sharepoint 2010 Central Administration, on the Upgrade Status page, confirm that Status is Succeeded.
  2. Observe the number of Errors and Warnings. There should be no errors. However, warnings are expected.
  3. Identify the Log file that contains a record of events during the upgrade.
  4. Open the log file in Notepade.
  5. Press CTRL+F, and then type [Warning]
  6. Read the first warning message
  7. Press F3 to locate the next warning message, and then read the message. Repeat this step for all warning messages.
  8. Close Notepad.
F. Upgrading Content Databases
F. 1. Attempt to attach a content database
  1. In the Quick Launch, click Application Management.
  2. In the Databases section, click Manage Content Database.
  3. Click Add a content database.
  4. In the Database Server box, type SP2007-WFE1.
  5. In the Database Name box, type WSS_Content_Intranet, and then click OK.
    An error page opens that explains you must use the addcontentdb operation of Stsadm.exe or the Mount-SPContentDatabase cmdlet of Windows PowerShell to attach and upgrade a content database.
  6. Click Go back to site.
F. 2. Attach content database using Windows Powershell
  1. Open the Sharepoint 2010 Management Shell.
  2. Type the following commands:

    Mount-SPContentDatabase "WSS_Content-Intranet" -DatabaseServer SP2007 -WFE1-webApplication http://intranet.contoso.com
    Mount-SPContentDatabase "WSS_Content_Intranet_IT" - DatabaseServer 2007-WFE1 -webApplication http://intranet.contoso.com
    Mount-SPContentDatabase 'WSS_Content_Intranet_Sales" -DatabaseServer SP2007-WFE1 -webApplication http://intranet.contoso.com
F. 3. Verify the database upgrade
  1. Switch to Sharepoint 2010 Central Administration
  2. In the Quick Launch, click Upgrade and Migration.
  3. In the Upgrade and Patch Management section, click Check upgrade status. The Upgrade Status page appears.
  4. Click the first item in the Upgrade sessions list.
  5. Identify the Starting objects for the upgrade session.
  6. Observe the number of errors and warnings.
  7. Repeat steps 4-6 for each upgrade sessions.
F. 4. Verify the database attach
  1. In the Quick Launch, click Application Management
  2. In the Databases section, click Manage content databases. The Manage Content Databases page opens.
  3. Click the Web Application list, and then click Change Web Application
  4. Click Sharepoint-intranet.contoso.com80.
  5. Confirm that three databases are attached to the intranet Web Application.
  6. Click WSS_Content_intranet.
  7. In the Database Versioning section, confirm that the Microsoft.Sharepoint.Administration.SPContentDatabase Current Scheme Version is 14.0.4762.1000
F. 5. Verify database upgrade status
  1. In the Quick Launch, click Upgrade and Migration..
  2. In the Upgrade and patch management section, click Check product and patch installation status.
  3. Confirm that all products are listed as Installed with a version of 14.0.4762.1000
  4. In the Quick Launch, click Upgrade and Migration..
  5. In the Upgrade and Patch management section, click Review database status. The Manage Database Upgrade Status page opens.
  6. Confirm that the Status for all databases is No action required. If they are not yet upgraded, your upgrade process is still running.
F. 6. Run the Farm Configuration Wizard
  1. In the Quick Launch, click Configuration Wizards.
  2. In the Farm Configuration section, click Launch the Farm Configuration Wizard.
  3. Click Yes, I am willing to participate (Recommended), and then click OK.
  4. Click Start the Wizard.
  5. In the Service Account section, click Create new managed account.
  6. In the User name box, type CONTOSO\SP_ServiceApps
  7. In the Password box, type its password.
  8. Click Next.
  9. Click Skip
  10. Click Finish
  11. Close Sharepoint 2010 Central Administration
  12. Close all windows and application.
G. Implementing a Visual Upgrade
G. 1. Validate the Sharepoint 2007 User Interface
  1. Open Internet Explorer.
  2. In the address bar, type http://intranet.contoso.com/sites/IT, and then press ENTER. If you receive an error, click Go back to site.
  3. Click Welcome Contoso\Administrator, and then click Sign in as different user.
  4. Log on as Contoso\SP_admin with the password.
  5. In the Quick Launch, click Calendar.
  6. Observe the Sharepoint 2007 user interface.
 G. 2. Preview the Sharepoint 2010 user interface
  1.  Click Site Actions, and then click Visual Upgrade.
  2. Click the Preview the updated user interface option, and then click OK
  3. Observer the new Sharepoint 2010 user interface.
G. 3. Revert to the Sharepoint 2007 user interface
  1.  In the information bar, click View or modify this site's Visual Upgrade settings.
  2. Click Use the previous user interface, and click OK.
  3. Click the Home tab.
  4. In the Quick Launch, click Calendar.
  5. Observe the Sharepoint 2007 user interface.
 G. 4. Upgrade to the Sharepoint 2010 user interface.
  1.  Click Site Actions, and then click Visual Upgrade.
  2. Click Update the user interface, and then click OK. The site is updated to the new Sharepoint 2010 look and feel.
  3. Click Site Actions, and then observe that the Visual Upgrade command no longer appears.