Microsoft KB Archive/926718

From BetaArchive Wiki
Knowledge Base


How to attach a content database backup during a gradual upgrade of a Windows SharePoint Services 2.0 farm to Windows SharePoint Services 3.0

Article ID: 926718

Article Last Modified on 5/14/2007



APPLIES TO

  • Microsoft Windows SharePoint Services 3.0



INTRODUCTION

This article describes how to attach a Microsoft Windows SharePoint Services 2.0 content database backup during a gradual upgrade of a Windows SharePoint Services 2.0 farm to the original release version of Microsoft Windows SharePoint Services 3.0.

MORE INFORMATION

To successfully attach a Windows SharePoint Services 2.0 content database backup during a gradual upgrade to the original release version of Windows SharePoint Services 3.0, follow these steps:

  1. Use an account that has administrative permissions to log on to the computer that is running Windows SharePoint Services 2.0.
  2. Click Start, click Run, type cmd, and then click OK.
  3. At the command prompt, change to the \Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN directory.
  4. At the command prompt, type the following command to repair the Windows SharePoint Services 2.0 content database and to delete any orphaned items, and then press ENTER:

    stsadm -o databaserepair -url http://URLofWindowsSharePointServicesSite -databasename DatabaseName -deletecorruption

    Note For Windows SharePoint Services 2.0, the databaserepair option is available as a software update. For more information about this software update, click the following article number to view the article in the Microsoft Knowledge Base:

    918743 Description of the Microsoft Windows SharePoint Services post-Service Pack 2 hotfix package: June 1, 2006

    For more information about how to use the databaserepair option to repair content databases in Windows SharePoint Services, click the following article number to view the article in the Microsoft Knowledge Base:

    918744 Description of a new command-line operation that you can use to repair content databases in Windows SharePoint Services

  5. Click Start, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.
  6. In SharePoint 3.0 Central Administration, click Application Management, and then click Content Databases under SharePoint Web Application Management.
  7. On the Manage Content Databases page, click the list next to Web Application, and then click Change Web Application.
  8. On the Select Web Application page, click the Web application that you want.
  9. Refresh your browser to update the content database list under Database Name.
  10. Before you remove the content database, make sure that new Windows SharePoint Services sites have been created in the database that you want to remove.

    You can determine whether any new sites have been created in the database by using SQL Query Analyzer to compare the Windows SharePoint Services 3.0 content database with the Windows SharePoint Services 2.0 content database. To do this, follow these steps:
    1. Click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    2. In the Connect to SQL Server dialog box, specify the instance of SQL Server to which you want to connect, specify the type of authentication that you want to use, and then click OK.
    3. Type the following query in the Editor pane of SQL Query Analyzer.

      USE [<WSS_3.0_Configuration_Database>]
      GO
      DECLARE @dbid UNIQUEIDENTIFIER
      DECLARE @pairname NVARCHAR(100)
      DECLARE @databasename NVARCHAR(100) 
      
      SELECT @pairname = '<WSS_3.0_Content_Database>'
      
      SELECT @dbid = (SELECT [id] FROM DBO.objects WHERE [name] = @pairname)
      
      SELECT REPLACE(t1.fullurl,'http://team','') [v2URL]
      FROM [PS-SQL-2x\pssql2x].<WSS_2.0_Content_Database>.DBO.sites t1
      WHERE NOT EXISTS
            (SELECT t2.[path] FROM DBO.sitemap t2 WHERE t2.databaseid = @dbid
                  AND t2.[path] = REPLACE(t1.fullurl,'http://team',''))

      Note The placeholders in this query are defined as follows:

      • WSS_3.0_Configuration_Database is the name of the Windows SharePoint Services 3.0 configuration database.
      • WSS_3.0_Content_Database is the name of the Windows SharePoint Services 3.0 content database.
      • WSS_2.0_Content_Database is the name of the Windows SharePoint Services 2.0 content database.
    4. Click Execute Query. If there are new sites in the target content database, you must set the database to single-user mode, rename the database, and then leave the database attached to the farm. If there are no new sites, you can remove the content database.
  11. Click the database that you want to remove.
  12. On the Manage Content Database Settings page, click to select the Remove content database check box, and then click OK to remove the database.
  13. Refresh your browser to update the content database list under Database Name.
  14. At the command prompt, type the following command to attach the Windows SharePoint Services 2.0 content database, and then press ENTER:

    stsadm -o addcontentdb -url http://URLofWindowsSharePointServicesSite -databasename DatabaseName -databaseserver DatabaseServer.

    Note The placeholders in this command are defined as follows:

    • http://URLofWindowsSharePointServicesSite is the URL of the SharePoint site that hosts the content database.
    • DatabaseName is the name of the database that you want to attach to the new Web application.
    • DatabaseServer is the name of the computer that hosts the content database.



Additional query words: WSSv3 RTM

Keywords: kbhowto kbprb kbexpertiseinter KB926718