Quantcast
Channel: Backing up WSUS database via the command line
Viewing all articles
Browse latest Browse all 6

Backing up WSUS database via the command line

$
0
0
Revision 5 posted to TechNet Articles by Mohamed El-Qassas MVP on 5/18/2017 12:26:37 PM

How to backup SUSDB utilizing SQLCMD on a WID (Windows Internal Database).

You will need the following two downloads installed on your server for sqlcmd.exe to work.

Microsoft SQL Server 2005 Command Line Query Utility:

http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_SQLCMD.msi

Microsoft SQL Native Client:

http://go.microsoft.com/fwlink/?LinkId=54583

Create a .sql script using the following text and substitute the c:\temp\susdb.bak for wherever you want your backup to reside.

BACKUP DATABASE [SUSDB] TO DISK = N'c:\temp\susdb.bak' WITH NOFORMAT, NOINIT, NAME = N'SUSDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

GO

Save the script as c:\temp\susdb.sql

Run the following from the command line:

sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i c:\temp\susdb.sql

Specify the correct location for where you have your .sql script located.

Tags: Command line, Backup, SQL Server, WSUS, has script, en-US

Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images