WSUS/SCCM DB Cleanup (SCUP)

More and more often it seems that the WSUS DB becomes too large that it causes multiple issues especially with SCCM integration (SCUP). You may not be able to perform the required maintenance using scripts (Download Here)  but often enough the service will crash thus you will need to troubleshoot at the SQL/WID level to perform a cleanup.

SQL/WID Cleanup Queries

Download the scripts here and run in order:

SQLQuery – 1 Remove Unused Updates
SQLQuery – 2 Remove Hidden Updates
SQLQuery – 3 Re-index Database

If your SUSDB is on a dedicated SQL Instance, connect to that  server/DB and run the SQL Queries.

If you are running Windows Internal Database, this will still require SQL Management Studio (Run As Administrator)

Server Name to connect to

2012 (or later) \\.\pipe\MICROSOFT##WID\tsql\query
2003 & 2008  \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.