Install ‘SQL Server Management Studio Express’
Run ‘SQL Server Management Studio Express’ as Administrator.
Server is \\.\pipe\MICROSOFT##WID\tsql\query
Backup your SUSDB.
Check this:
https://docs.microsoft.com/de-de/troubleshoot/mem/configmgr/wsus-maintenance-guide
https://docs.microsoft.com/en-us/troubleshoot/mem/configmgr/wsus-maintenance-guide
Short:
Create a project, Create custom indexes (ONLY BEFORE YOUR FIRST REINDEXING, once in a databases lifetime), reindex (https://docs.microsoft.com/de-de/troubleshoot/mem/configmgr/reindex-the-wsus-database https://docs.microsoft.com/en-us/troubleshoot/mem/configmgr/reindex-the-wsus-database)
HINT: Never distribute drivers via WSUS. Exclude them in WSUS. I did approve some drivers and earned troubles. The client machines got hickups and did lament. In the result i did decline these driver updates but they did re-appear as un-approved. I did try this several times. Finally i did decline ALL (350.000 and something) drivers. That did the job. Benefit: The database became more agile.
HINT2: If you need free space, run the ‘Options/Cleanup’ stuff in reverse (checkboxes from down to top) and only ONE ceckbox for a run. Otherwise the process probably will crash at the first checkbox and never do the rest.