So I have an upstream WSUS server which never ran the cleanup wizard. The content folder is around 800GB and there were also a lot of unneeded product categories enabled including drivers.
As a first step I disabled unneeded categories and synced. Then I tried to run the cleanup wizard, which will run but not for the option Unused updates and update revisions
. If this is checked the wizard will fail nearly immediately.
The goal is to get the cleanup wizard to kick out uneeded updates so that the content folder will shrink and all replica servers won't have that much load.
For this I am following this guide.
There is a section HELP! My WSUS has been running for years without ever having maintenance done and the cleanup wizard keeps timing out.
Ensure you have a backup of the SUSDB then run a re-index. When that completes, run the following stored procedure in SQL Server Management Studio or SQL Server Management Studio Express. After this finishes, follow all of the above instructions for running maintenance. This last step is necessary because the stored procedure here only removes unused updates and update revisions.
Done so far
- Re-index the database
- Logged into WSUS with SQL Server Management Studio
- Declined superseded updates with the script provided in the guide
- Determine how many obsolete updates exist with this query on the DB
EXEC spGetObsoleteUpdatesToCleanup
Not working
There is a SQL script which batch removes all uneeded updates. As a first step I tried to remove a single update from the spGetObsoleteUpdatesToCleanup
table like this:
exec spDeleteUpdate @localUpdateID=224734
This gives the following error
Msg 50000, Level 16, State 1, Procedure spDeleteRevision, Line 33 [Batch Start Line 0]
@errorMessage
Msg 50000, Level 16, State 1, Procedure spDeleteUpdate, Line 72 [Batch Start Line 0]
spDeleteUpdate got error from spDeleteRevision
The SQL script for batch removing also fails with this errors.
How can I get the SQL script to batch remove uneeded updates so finally the cleanup wizard will run?
Also: shouldn't the number of declined updates correspond to the number of updates in spGetObsoleteUpdatesToCleanup
?
Other resources:
0 Answers