Microsoft KB Archive/925190

= How to move a WMSDE content database that resides on a Windows SharePoint Services 2.0 server to a Windows SharePoint Services 3.0 server =

Article ID: 925190

Article Last Modified on 5/14/2007

-

APPLIES TO


 * Microsoft Windows SharePoint Services 3.0

-



INTRODUCTION
This article describes how to move a Microsoft SQL Server 2000 Desktop Engine (Windows) (WMSDE) content database that resides on a Microsoft Windows SharePoint Services 2.0 (WSS) server to a Microsoft Windows SharePoint Services 3.0 (WSS 3.0) server.

When you move the WSS database to the WSS 3.0 server, the WSS database is upgraded to WSS 3.0. This occurs when you attach a WSS 3.0 Web application.



MORE INFORMATION
To move a WMSDE content database that resides on a WSS server to a WSS 3.0 server, follow these steps:  Use the Prescan.exe tool to scan the WMSDE content database on the WSS server.

Note You must run the Prescan.exe tool on the WSS database to prepare the database to be added to the WSS 3.0 Web application.

To use the Prescan.exe tool to scan the WSS database, follow these steps:  Use an account that has administrative permissions to log on to the WSS server. Copy the Prescan.exe tool on the WSS 3.0 server to a folder on the WSS server.

Note The Prescan.exe tool is located on the WSS 3.0 server in the following folder:

Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

 Click Start, click Run, type cmd, and then click OK. Locate the folder to which you copied the Prescan.exe tool. At the command prompt, type the following command to scan the database:

prescan /all

 </li> Use the Osql command to connect to the WSS database. To do this, follow these steps:  At the command prompt, type the following command, and then press ENTER:

Osql –S \sharepoint -E

Note In this command,  is the name of the WSS server.</li> At the 1> prompt, type the following command, and then press ENTER:

EXEC sp_detach_db

Note In this command,  is the name of the content database.</li> At the 2> prompt, type Go, and then press ENTER.</li></ol>

Note You may receive a message that resembles the following:

database is in use and cannot be detached

If you receive this error message, type the following commands at the command prompt in the order in which they are presented. <ul>  net pause mssql$sharepoint </li>  net continue mssql$sharepoint </li></ul> </li> On the WSS 3.0 server, create the following folder structure under the Windows folder:

SYSMSI\SSEE\MSSQL.2005\MSSQL\Data

</li> Copy all the .mdf and .ldf files that are located in the WSS database to following folder on the WSS server:

WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data

</li> Use an account that has administrative permissions to log on to the WSS 3.0 server.</li> On the WSS 3.0 server, download and install the Microsoft SQL Server Native Client and the Sqlcmd utility. These tools are available in the latest feature pack for Microsoft SQL Server 2005.

For more information about the feature pack for Microsoft SQL Server 2005, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en

</li> On the WSS 3.0 server, run the following command at the command prompt:

sqlcmd -S \\.\pipe\mssql$microsoft##ssee\sql\query -E

</li> At the 1> prompt, type the following command, and then press ENTER:

EXEC sp_attach_db @dbname = N' ', @filename1 = N'D:\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data\ _1.mdf', @filename2 = N'D:\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data \ _1_log.ldf’

Note In this command,  is the name of the content database.</li> At the 2> prompt, type Go, and then press ENTER:</li> On the WSS 3.0 server, create a Web application to attach to the database.

For more information about how to create a Web application in WSS 3.0 server, see the administrative documentation.

If you have already created a new Web application, you must use the Manage Content Databases page to remove the content database from the Web application. This lets you add the migrated database from the WSS server. To do this follow these steps:  <li>On the WSS 3.0 server, click Start, point to Administrative Tools, and then click SharePoint 3.0 Central Administration.</li> <li>On the Central Administration page, click Application Management.</li> <li>On the Application Management page, click Content Databases.</li> <li>On the Manage Content Databases page, click the Web application that you want.</li> <li>Click the name of the new database that was created when you created the Web application.</li> <li>On the Manage Content Database Settings page, click to select the Remove content database check box, and then click OK.</li></ol> </li> <li>Use the Stsadm.exe command-line tool to attach the WSS database to the Web application. Windows SharePoint Services does not support using the Manage Content Databases page to add a WSS database to a Web application. Therefore, you must use the Stsadm.exe command-line tool to add the Windows SharePoint 2.0 database to the Web application.

To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>At the command prompt, locate the following folder:

\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

</li> <li> At the command prompt, type the following command for more information about how to use the Stsadm.exe command-line tool.

stsadm -help addcontentdb

The following output is generated: <pre class="fixed_text">stsadm.exe -o addcontentdb -url url -databasename  is the url of the WSS 3.0 Web application to which you want to add the database. </li></ol> </li></ol>

<div class="references_section">