Problems with WSUS Cleanup on SBS

I am trying to cleanup WSUS on SBS 2008. I have been trying to use the Server Cleanup Wizard located in the Server Manager. I chose all cleanup options exc ept the first one that says Clean upUnused updates and revision updates I I was able to get the 4 sections cleaned up.

I have read that The Unused updates section takes a while to run and if it crashes, that isn't unusual just rerun it. I have run this wizard over 12 times. Each time it crashes between 10 and 15 hours into the process. My WSUS database folder is over 130 Gb in size and I need to clean it up.

What should I be doing? Am I missing something?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Thomas GrassiSystems AdministratorCommented:

Try running this from command line

I use this script run once a week

@echo off
del c:\util\cleanup_history.txt

rem c:\util\wsus_cleanup_cl server f 80 all    removed 2/22/2013
c:\util\wsus_cleanup_cl server f 80 superseded expired obsolete compress computers files

if you have a batch email client you can send an email to your self here
Rodney BarnhardtServer AdministratorCommented:
You could try to do it manually per these instructions:

However, does the cleanup provide additional space each time  you run it? Does it seem to be working even though it crashes?
Randy DownsOWNERCommented:
There may be something helpful in this thread.

There was a similar question on EE last week where it took the author 6 times to get the clean up wizard to finally complete.  Each of the 5 previous times he had the time out and error message.  They only had an 11GB database.  Sounds like yours has the all languages switch enabled.  Usually each time it runs it is doing some cleanup, but due to size times out.

The following article may be of some help in troubleshooting:
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

LostInWindowsAuthor Commented:
Your post seems incomplete. There isn't any file on my server called wsus_cleanup_cl
What are the scripts that wsus_cleanup_cl runs?
Thomas GrassiSystems AdministratorCommented:

Oops my bad

you need to download that exe file

check this out
LostInWindowsAuthor Commented:
Thanks,that makes it easier.  :-)
LostInWindowsAuthor Commented:
I finally called Microsoft and opened a case. Here is what they did:
>>Followed article - to re index WSUS database.

>>Browsed  C:\Program Files\Microsoft SQL Server\100\Tools\Binn and copied script as  WsusDBMaintenance.sql  (

>>browsed  C:\Program Files\Microsoft SQL Server\100\Tools\Binn in cmd prompt and run the below cmd

 C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd -I -i WsusDBMaintenance.sql -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query > reindex.txt

>>Ran the wsus removal script.

>>Rebooted the server.

>>Tried to install wsus 3.0 SP( got error " install windows installer 3.1 or higher version.

>>Ran sfc /scannow but no errors reported.

>>Ran checksur and it did not report any error.

>>Checked hklm\Software\Microsoft\Windows\CurrentVersion\Installer and compared the entries with working machine and found many entries missing on customer’s server.

>>Exported registry from working machine.

>>Installed wsus 3.0 Sp2  (

>>installed update for wsus 3.0 Sp2 (

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LostInWindowsAuthor Commented:
I now consider this case resolved
Thomas GrassiSystems AdministratorCommented:
I still think that you should use my suggestion from this point forward so you do not run into this issue again.

Gave you the batch file and the link to the software
LostInWindowsAuthor Commented:
Thomas - I did try it but it did not work. I will use it monthly going forward. Thank you for the reminder.
Thomas GrassiSystems AdministratorCommented:
You should do it weekly
I have a small network here and was doing it monthly first and it failed sometimes because of so many updates after I changed it to weekly have not had a problem

Just a thought

Yes I know it did not fix the issue your db was corrupt that's why ms did what they did
LostInWindowsAuthor Commented:
I asked Microsft how to fix it. What they did is in the discussion.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.