Networknet archive Blog

WSUS 3.0: Back up or export the database

Originally published Last updated 2 comments

By Ivan Versluis

To back up the WSUS 3.0 database from the command line, first install Microsoft SQL Server Native Client and Microsoft SQL Server 2005 Command Line Query Utility on the WSUS server.

Download sqlncli.msi and SQLServer2005_SQLCMD.msi from Microsoft and install both MSI packages.

Open a CMD command shell and run sqlcmd with the following options:

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

You are now connected to the "Windows Internal Database," which is based on SQL Server Express 2005. WSUS 3 and other Windows components, such as Windows SharePoint Services 3.0, use this SQL engine.

To back up the database, enter the SQL command below. Change the DISK option to a local folder on the server.

SQL1 line
1
BACKUP DATABASE [SUSDB] TO DISK = N'G:\WSUS\UpdateServicesDbFiles\SUSDB.BAK' WITH NOFORMAT, INIT, NAME = N'WSUS Database Backup', SKIP,NOREWIND, NOUNLOAD, STATS = 10<br />Go

sqlcmd

1 comment

Comments from the original WordPress site, kept read-only.

  1. susika

    yeah, that's exactly what I've searched for. I changed it to a script with -i , so you can automate it. Thanks.

1 mention