Standard problem with WSUS Cleanup Wizard timing out without removing any unnecessary updates. SBS2K8. WSUS 3. 6000+ unnecessary updates awaiting approval. Huge database. Unresponsive SQL server. Lot of people have this problem.
Drives are regularly defragged in the background. Not gonna shut down the server and have down time just to fix this.
Tried the reindexing script from
, (don't copy the command line, it has weird characters in it, just type it in manually.) and it completes but it didn't improve anything.
and it also times out.
Found this comment:
For anyone who is getting Timeout Expired with obsolete updates. I
have a solution! Use server name : "
\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query " to connect with SQL
managment studio. Once connected manually run " exec
spGetObsoleteUpdatesToCleanup ". This will return a list of obsolete
ID's. For each one run " exec spDeleteUpdate @localUpdateID=000000 ",
where 000000 is the ID. For myself I found the first ID in the list
took a full 37 minutes to delete and then after that I could run the
cleanup through the GUI as per usual.
by jjdacl on Apr 23 at 12:55 PM
Found that you actually need to do:
And to connect in the first place, I had to hit Options, and select named pipe from the middle pull down.
First delete took 6 minutes and memory has spiked up to almost 15GB in use out of 16GB physical. But the WSUS console (Update Services) still shows the same number of old updates. Failure? I don't think so: I'm running the cleanup wizard again and so far it isn't timing out... It has run over night, and has made some progress; the bar has moved perhaps 5%.
So... My take is that the SQL server causes this problem when there is to much data, because the indexes are poorly designed (not because the indexes need to be re-indexed) causing the first query to time out, which causes the cleanup to fail. Once you get past that first deletion, and have everything loaded into memory, the cleanup tool can stay connected long enough to delete each unneeded update.
Next step will be to find a command line method, such as:
and put it into the task scheduler like Microsoft should have done at the beginning to keep this from getting out of hand.