Moving WSS 3.0 Databases

Tuesday, November 18th, 2008 | Tech Help

WSS 3.0 uses Microsoft SQL Embedded Edition (MSEE) for its data store. When MSEE is installed, the data files are installed to your C: drive by default. Since you do not want to have a file on your system drive that can grow exponentially, you need to move it to another drive. Here is how you do it.

Note: While completing this process your WSS site will be offline to your users.

  1. Shutdown all Windows Sharepoint services & IIS Admin service: This will ensure that there are no locks on the files you need to move.
  2. Open a cmd prompt and cd to C:\Program Files\Microsoft SQL Server\90\Tools\binn
  3. Enter sqlcmd -S \\.\pipe\mssql$microsoft##ssee\sql\query -E: This starts the Microsoft SQL Server 2005 Command Line Query Utility
  4. Enter the following commands to view the available databases & hit Enter after each:
    • SELECT name from sysdatabases
    • GO

    You should see a number of DBs, move the following 4 databases (GUID’s may be different):

    • SharePoint_Config_c464b7ce-59ef-4820-9f75-f46a0937c08e
    • SharePoint_AdminContent_451452bf-9dc0-40c9-be18-14f14bc23007
    • WSS_Search_NETSERVER_86a140c5958d4a5d97c8c2cbee745424
    • WSS_Content
  5. Enter the following commands & hit Enter after each line. Repeat for each database.
    • EXEC sp_detach_db @dbname = ‘Content_Database_name’

    • GO
  6. Move the databases to their new location. They can be found in C:\Windows\SSQL\Data\.mdf and _log.ldf
  7. After the files have been moved run the following commands (Make sure to change the itialic sections to your specifics):
    • EXEC sp_attach_db @dbname = ‘Content_Database_name‘, @filename1 = ‘drive:\path\Data\.mdf’, @filename2 = ‘drive:\path\Data \_log.ldf’
    • Go
  8. Repeat step 7 for each database you moved.
  9. Restart IIS Admin services and all Windows Sharepoint services
  10. Ensure your Sharepoint site is working

If this is done before you build your site it will take no time at all to move the DBs to the new location.

Tags: ,


2 Comments to Moving WSS 3.0 Databases

Koncis
March 12, 2009

good post, it’s really working!
Thanks ;)

Dave
April 26, 2009

good post, it’s really working!
Thanks ;)

Glad to have helped out!

Search

Catagories

Photos

IMG_1092.JPG
IMG_1129.JPG
IMG_1081.JPG
IMG_1211.JPG
IMG_1277.JPG
IMG_1093.JPG

Get Spiceworks!

Free Networking Monitoring Software For Network Management