Hi 38542140,
Thanks for your posting on this forum.
Please refer to the below steps to see whether this issue will be resolved or not:
Method 1.Open the SSMS as an administrator and connect to the WSUS database.
Right click on the server name, select Properties/Connections, set timeout from remote query timeout from 600 to 0 (= no timeout). Then run the server cleanup wizard again and wait for the results. It would take lots of time to complete.
Reference picture:
Method 2.We could run the following query in the SSMS to delete the unused updates and update revisions directly.
DECLARE @var1 INT
DECLARE @msg nvarchar(100)
CREATE TABLE #results (Col1 INT)
INSERT INTO #results(Col1) EXEC spGetObsoleteUpdatesToCleanup
DECLARE WC Cursor
FOR
SELECT Col1 FROM #results
OPEN WC
FETCH NEXT FROM WC
INTO @var1
WHILE (@@FETCH_STATUS > -1)
BEGIN SET @msg = 'Deleting' + CONVERT(varchar(10), @var1)
RAISERROR(@msg,0,1) WITH NOWAIT EXEC spDeleteUpdate @localUpdateID=@var1
FETCH NEXT FROM WC INTO @var1 END
CLOSE WC
DEALLOCATE WC
DROP TABLE #results
Hope the above will be helpful.
Please remember to inform me if there are any updates.
Regards,
Rita
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.