By default, WSUS 3.0 on SBS 2003 R2 server uses Windows Internal Database.
If WSUS 3.0 uses other versions of SQL server, the moving steps will be a
little different, but the procedures are almost same. They are:
1. Detach SUSDB from SQL Server.
2. Move SUSDB.mdf and SUSDB_Log.ldf to the new location.
3. Attach SUSDB to SQL Server again.
If WSUS 3.0 is using Windows Internal Database, please follow these steps
to move SUSDB:
1. Open a "CMD" command window, and run these commands to stop the WSUS
service and IIS:
net stop wsusservice
iisreset /stop
2. Detach the SUSDB.
a. Follow the instructions to download and install "Microsoft SQL Server
Management Studio Express" on the WSUS server:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=6053
c6f8-82c8-479c-b25b-9aca13141c9e
(Please note: we need to install MSXML6 and .Net Framework 2.0 first. If
this tool already exists, please ignore this step.)
b. Click "Start"->"All Programs"->"Microsoft SQL Server 2005"->"SQL Server
Management Studio" to run this tool.
c. Select the SQL server/instance used by WSUS, and then click Connect. For
WSUS 3.0 with Windows Internal Database, please copy/paste this name:
\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
(If this name is unreachable, please WSUS may not use Windows Internal
Database, please verify this registry value to confirm the SQL name:
HKEY_LOCAL_MACHINE\Software\Microsoft\Update
Services\Server\Setup\SqlServerName.
%computername%\MICROSOFT##SSEE means Windows Internal Database.)
d. Expand the "Databases" node from the left pane; Right click the "SUSDB",
then click "Tasks"->"Detach" and "OK".
If it fails, please select the "Drop Connections" checkbox and try again.
3. Move the SUSDB.mdf and SUSDB_Log.ldf to a new location by Windows
Explorer. By default, they are in the
"<Driver>:\WSUS\UpdateServicesDbFiles" folder.
4. Attach the SUSDB database from the new location.
a. Switch back to the Management Studio and right click the "Databases"
node, and then click "Attach".
b. Click "Add" button; Navigate to the new location, and then select the
SUSDB.mdf and click "OK".
5. Start the WSUS and IIS services with these commands:
net start wsusservice
iisreset /start
Now the process is finished. Please open the WSUS console and verify if
WSUS is working properly.
If WSUS 3.0 uses other versions of SQL server, the moving steps will be a
little different, but the procedures are almost same. They are:
1. Detach SUSDB from SQL Server.
2. Move SUSDB.mdf and SUSDB_Log.ldf to the new location.
3. Attach SUSDB to SQL Server again.
If WSUS 3.0 is using Windows Internal Database, please follow these steps
to move SUSDB:
1. Open a "CMD" command window, and run these commands to stop the WSUS
service and IIS:
net stop wsusservice
iisreset /stop
2. Detach the SUSDB.
a. Follow the instructions to download and install "Microsoft SQL Server
Management Studio Express" on the WSUS server:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=6053
c6f8-82c8-479c-b25b-9aca13141c9e
(Please note: we need to install MSXML6 and .Net Framework 2.0 first. If
this tool already exists, please ignore this step.)
b. Click "Start"->"All Programs"->"Microsoft SQL Server 2005"->"SQL Server
Management Studio" to run this tool.
c. Select the SQL server/instance used by WSUS, and then click Connect. For
WSUS 3.0 with Windows Internal Database, please copy/paste this name:
\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
(If this name is unreachable, please WSUS may not use Windows Internal
Database, please verify this registry value to confirm the SQL name:
HKEY_LOCAL_MACHINE\Software\Microsoft\Update
Services\Server\Setup\SqlServerName.
%computername%\MICROSOFT##SSEE means Windows Internal Database.)
d. Expand the "Databases" node from the left pane; Right click the "SUSDB",
then click "Tasks"->"Detach" and "OK".
If it fails, please select the "Drop Connections" checkbox and try again.
3. Move the SUSDB.mdf and SUSDB_Log.ldf to a new location by Windows
Explorer. By default, they are in the
"<Driver>:\WSUS\UpdateServicesDbFiles" folder.
4. Attach the SUSDB database from the new location.
a. Switch back to the Management Studio and right click the "Databases"
node, and then click "Attach".
b. Click "Add" button; Navigate to the new location, and then select the
SUSDB.mdf and click "OK".
5. Start the WSUS and IIS services with these commands:
net start wsusservice
iisreset /start
Now the process is finished. Please open the WSUS console and verify if
WSUS is working properly.
Great post - most others only seem to refer to the MSDE WSUS install using osql commnds, glad I kept Googling until I found it...
ReplyDeleteSBS2008 Std install uses the Windows Internal Database method as above.
As if you knew what I was looking for.
ReplyDeleteMany thanx.
Johan from the Netherlands.
Great post. Many thanks.
ReplyDeleteThank you so much, no-one else seems to get the fact that /movecontent does not move the mdf files. Or, if they get that far, that it is "windows internal database".
ReplyDeleteIn SQL mgmt 2008, I used:
Server type: Database Engine
Server name: \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
This is by far the best guide for moving WSUS DB. Thanks for writing this with clear instructions.
ReplyDeleteThank you, thank you, thankyou. It took me a long time to find this method. However I did not have the Surface Area Configuration tool installed which is required to allow remote connections to the database. Nowhere could I find instructions on how to load this specific component. I eventually loaded the full version of SQL Express 2005 SP2 which gave me the SAC tool. I was then able to proceed with your instructions and free up 7GB from my server C: drive.
ReplyDeleteThank you for this, I looked high and low.
ReplyDeleteDid exactly as described and did exactly what i was looking for.
thank you thank you thank you.
Brilliant Post. Does exactly what it says !
ReplyDeleteyou can also try the corrupt mdf recovery tool
ReplyDeleteGreat post!!
ReplyDeleten PS one point:add your account to group "WSUS Administrators", if u got error in detach.
Important note: in order to open the SSEE db in the SQL server management studio through the pipe string, you have to right click and launch it as an administrator.
ReplyDelete