Skip to main content

WSS Demo

Go Search
WSS Demo
Blog
Wiki
SharePoint, MOSS & WSS Resource Links
Fantastic 40 Templates
MOSS End User Training
  
WSS Demo > SharePoint > db  

Web Part Page Title Bar image
How to change the location of a Windows SharePoint Services 3.0 content database
WSS Internal Database for stand-alone install


Site By: Ian Morrish
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
Hosted By:
Intergen
 Runtime Page Optimizer
Translate this page
Microsoft Windows SharePoint Services 3.0 (WSS) & MOSS Demo site by Ian Morrish

 Content Editor Web Part

WSS 3.0 ships with a new Windows Internal Database based on SQL Server 2005. Its code name was wYukon.

You will see it as a running service called MSSQL$MICROSOFT##SSEE

When referring to the database server name in any stsadm commands, you should use this name:

ServerName\Microsoft##SSEE

It has many advantages over the previous WMSDE that shipped with WSS 2.0 (no 4 Gb database limit) but there are 2 administration downsides:

  1. no database admin tools are install. The only options are the sqlcmd command line utility (replaces the old osql utility) or Management Studio Express (both must be run on the server as no remote connections to WID are allowed).
  2. you can't specify the install location of WID when you install WSS

Some of the other constraints are:

  • No remote connections can bbe made to the database engine

If you don't have another SQL Server 2005 product installed on the WSS server then you will have to download sqlcmd from here... (also install the Native Client from the same link). After installation, you will find the utility installed in the following location:

C:\Program Files\Microsoft SQL Server\90\Tools\binn

Run the following command from this directory to connect to the WID instance:

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

If you have installed SQL Management Studio Express then the connection string is \\.\pipe\mssql$microsoft##ssee\sql\query

All the SharePoint database files will default to being in the C:\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data directory. To move them to another partition you should stop all WSS services and IIS to release any locks on the databases, Find the name of the content database from the Central Admin site or stsadm command, then use the following sqlcmd commands...

Note: Miicrosoft is deprecating sp_detach_db and sp_attach_db as supported methods for moving db files on the same server. Instead you should use Alter Database commands as per http://msdn.microsoft.com/en-us/library/bb522469.aspx

EXEC sp_detach_db @dbname = 'Content_Database_name'
Go

You will find the db and log files in the following location

WINDIR%\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data\<dbname>.mdf' and <dbname>_log.ldf

Now copy the files to the new location and run the following command

EXEC sp_attach_db @dbname = 'Content_Database_name', @filename1 = 'drive:\path\Data\<dbname>.mdf', @filename2 = 'drive:\path\Data \<dbname>_log.ldf'
Go

Now you can restart the services and web sites.

There are 3 other SharePoint databases you may want to move to another location. The largest of these will be for search. To list them, use the following sqlcmd command:

select name from sysdatabases 
go

Which should give you something like this (GUID's may be different):

SharePoint_Config_c464b7ce-59ef-4820-9f75-f46a0937c08e
SharePoint_AdminContent_451452bf-9dc0-40c9-be18-14f14bc23007
WSS_Search_NETSERVER_86a140c5958d4a5d97c8c2cbee745424

Before trying to move these you should stop IIS and all the Windows SharePoint Services. Then you can use the same steps as above. 

If you have attached the databases to a full SQL Server instance , you can remove the SSEE SQL Instance using the following command:

X86 - msiexec /x {CEB5780F-1A70-44A9-850F-DE6C4F6AA8FB} CALLERID=ocsetup.exe

X64 - msiexec /x {BDD79957-5801-4A2D-B09E-852E7FA64D01} CALLERID=ocsetup.exe

Comment on this page...