Backup your WSUS database

"c:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD.EXE" -E -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -Q "BACKUP DATABASE [SUSDB] TO DISK = N'C:\backups\SUSDB.BAK' WITH NOFORMAT, INIT, NAME = N'WSUS Database Backup', SKIP,NOREWIND, NOUNLOAD, STATS = 10"

c:\backups must be writable by the user that is running the database. In my case, I believe this is user "NETWORK SERVICE".

© GeekLabInfo Backup your WSUS database is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Using SQL Server Management Studio Express for WID

Connecting to a Windows Internal Database (WID, codename WYukon) with SQL SServer Management Studio Express is possible. However, not over the network.

1. Install SQL Server Management Studio Express on the local machine.
2. Connect to \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query as instance name.

© GeekLabInfo Using SQL Server Management Studio Express for WID is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

How to move your SUSDB (WSUS)

WSUS 3 by default stores its metadata in the "Windows Internal Database". According to wikipedia, this is an embedded version of SQL Express, which ships with Win2k8, Sharepoint Services and WSUS.

So, how move this datastore around?

As with a regular SQL Server datastore, you can detach and move the database.

Download and install required tools

I got the tools from the microsoft website. I downloaded sqlncli.msi and SQLServer2005_SQLCMD.msi

Stop services

The following services must be stopped to be able to detach the database: IIS Admin Service and Update Services (Not Windows Update Service!). To do this, run:
net stop "update services"
net stop w3svc

Move it around

1. Detach the database
"c:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD.EXE" -E -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -Q "sp_detach_db 'SUSDB'"

2. Now move the SUSDB.mdf and SUSDB.ldf to their new location. In the example below, we use E:\WSUSDB\. Use explorer to move the files to the path you'd like.

3. Then we reattach the database:
"c:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD.EXE" -E -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -Q "sp_attach_db @dbname=N'SUSDB',@filename1=N'E:\WSUSDB\SUSDB.mdf', @filename2=N'E:\WSUSDB\SUSDB_log.ldf'"

Restart services

Restart the services we stopped before. To do this, run:
net start "update services"
net start w3svc

Related info

If you want to move the WSUS data itself as well, please see this page

© GeekLabInfo How to move your SUSDB (WSUS) is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.63 out of 5)
Loading...