Redirect SharePoint Products to Use a New Content Database

Whenever you move, rename, or restore data to the server that hosts the data for SharePoint Products, you must redirect the Web sites for team projects to use a new content database so that the project portals will remain accessible. As part of this redirection, you must detach and reattach the content database. When you detach the content database, you remove the reference to the database for the project portal. In the background, the list of sites in the content database is removed from the configuration database, but the content database and its data are unchanged. When you reattach the content database, the list of sites that are stored in the content database is re-added to the configuration database.

Required Permissions

To perform these procedures, you must be a member of the Administrators group on the server that hosts SharePoint Products.

Note

Even if you log on with administrative credentials, you must open an elevated Command Prompt window to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt window, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see this page on the Microsoft Web site: User Account Control.

To redirect project sites to use a new content database

  1. Log on to the server that is running Windows SharePoint Services 3.0, open Computer Manager, and make sure that the following components are started:

    • IIS Admin Service (IISADMIN)

    • HTTP SSL (HTTPFilter)

    • Windows SharePoint Services Timer (SPTimer)

    • World Wide Web Publishing Service (W3SVC)

    • SharePoint Central Administration (application pool)

    • SharePoint Central Administration (Web site)

  2. Click Start, point to Administrative Tools, and then click SharePoint Central Administration.

    The Central Administration window opens.

  3. Click the Application Management tab.

  4. Under SharePoint Web Application Management, click Content Databases.

    The Manage Content Database page opens.

  5. Click WSS_Content.

    Note

    WSS_Content is the default name. Your installation might use a custom name for this database.

    The Manage Content Database Settings page opens.

  6. Select the Remove content database check box, and then click OK.

    Note

    This step detaches the database but does not delete any content.

  7. In the warning dialog box that appears, click OK.

  8. In Manage Content Database Settings, click OK to confirm your changes.

  9. Open the Command Prompt window, and change directories to the Windows SharePoint Services bin directory.

    By default, you can find this directory in %programfiles%\Common Files\microsoft shared\web server extensions\12\BIN.

  10. Type the following command to add a content database:

    **stsadm -o addcontentdb -url http://**SharePointServerName -databaseserver newDataTierServerName -databasename WSS_Content

    Note

    WSS_Content is the default name. Make sure that the name that you type matches the name of the content database that you deleted in step 4.

  11. Type the following command to change the permission policy so that Team Foundation Server can access the content database:

    **stsadm.exe -o addpermissionpolicy -url http://SharePointServerName ** -userlogin DomainName\UserName –permissionlevel "full control"

  12. Type the following command to restart Internet Information Services:

    iisreset

  13. (Optional) If you backed up any custom site definitions, custom site templates, or custom Web parts for SharePoint Products that you want to keep, restore these components now. For more information, see this page on the Microsoft Web site: Recommendations for data protection and recovery (Windows SharePoint Services.Microsoft Web site

  14. Click Start, point to Administrative Tools, and click Services.

  15. Right-click Windows SharePoint Services Timer, and then click Start.

See Also

Concepts

Interactions Between SharePoint Products and Team Foundation Server

Other Resources

Managing SharePoint Sites