Close

Not a member yet? Register now and get started.

lock and key

Sign in to your account.

Account Login

Forgot your password?

SOLVED: How To Clean Up and Repair WSUS Database

wsus-clean-up-database-scriptIf you run a Windows Server Update Services (WSUS) server, you know that sometimes it can develop problems.  Specifically the WSUS database can need a manual clean up.  There are several scripts around that handle this but I found one HERE that helped me quite a bit.

Note that this script does not replace the WSUS SERVER CLEAN UP WIZARD.  If you are having problems with that (like SERVER NODE RESET messages), click HERE for the fix.

To run this script:

  1. Download it directly from us HERE and unzip the contents
    .
  2. Start a PowerShell as an Admin
    .
  3. If you are running WSUS from a Windows Internal Database on Server 2012 enter the following command:
    .
    sqlcmd -I -S \\.\pipe\MICROSOFT##WID\tsql\query -i C:\WsusDBMaintenance.sql  
    .
    If you are running WSUS from a from a Windows Internal Database on Server 2008 or SBS 2011, enter the following command:
    .
    sqlcmd -I -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query’ \query -i C:\WsusDBMaintenance.sql  
    .
    (Be sure adjust the path of C:\WsusDBMaintenance.sql to reflect where you actually put the script)
    .
  4. Wait.

I have not had this take more than 15 minutes but I have read reports of it taking a VERY long time.

I found THIS post and THIS post helpful when dealing with the WSUS problem.

 

 

 

 

Share This With Your Friends Now:
Facebooktwittergoogle_plusredditpinterestlinkedin

Leave a Reply

Please confirm you are a person and not a 'bot' by answering this simple question: Time limit is exhausted. Please reload CAPTCHA.