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
Starting in Configuration Manager version 1806, high availability for the site server role is a Configuration Manager-based solution to install an additional site server in passive mode. The site server in passive mode is in addition to your existing site server that is in active mode. A site server in passive mode is available for immediate use, when needed. Include this additional site server as part of your overall design for making the Configuration Manager service highly available.
A site server in passive mode:
- Uses the same site database as your site server in active mode.
- Doesn’t write data to the site database when it’s in passive mode.
- Uses the same content library as your site server in active mode.
To make the site server in passive mode become active, you manually promote it. This action switches the site server in active mode to be the site server in passive mode. The site system roles that are available on the original active mode server remain available so long as that computer is accessible. Only the site server role is switched between active and passive modes.
Find out more here: https://docs.microsoft.com/en-us/sccm/core/servers/deploy/configure/site-server-high-availability