Windows Update Server crashed often on Server 2016/2022 with WID Windows Internal Database. We have seen several newer WSUS Servers crahsing or hanging more often with SRV 2016 and even SRV 2019 WSUS.
The source may be this table, which is 26GB and holds all the patch information and language descriptions.
The full WID DB went to 44GB.
The sample was a date year 2019 installed WSUS in Server 2016 OS with 10 laptops and 4 Citrix Terminal Servers. Two languages DE/EN selected, OS W10/W11, SRV 2008-2016-2022.
A second case with SRV 2019 in 07/2024 with a 11GB SUSDB we had to reindex and shrink down to 9GB to get it running again. There we had the problem that we where unable to do Synchronizations (Failed/Unknown). Firewall was open (No SSL touched) all Root Certs on Server updated but the SYNC failed.
What you need for further analysis:
– Download, install, and open SQL Server Management Studio (SSMS)
– Connect to your WID instance. The server name for WID is typically2003R2:
\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
2012R2:
\\.\pipe\microsoft##WID\tsql\query
\\.\pipe\MICROSOFT##WID\tsql\query
Connect to WID Windows Internal Database on Server 2016-2022.
Check for large tables in SQL
SQL QUERY to see large tables |
SELECT
t.NAME AS TableName, i.name AS IndexName, p.[Rows], SUM(a.total_pages) AS TotalPages, SUM(a.used_pages) AS UsedPages, SUM(a.data_pages) AS DataPages, (SUM(a.total_pages) * 8) / 1024 AS TotalSpaceMB, (SUM(a.used_pages) * 8) / 1024 AS UsedSpaceMB, (SUM(a.data_pages) * 8) / 1024 AS DataSpaceMB FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id WHERE t.NAME NOT LIKE ‘dt%’ AND i.OBJECT_ID > 255 AND i.index_id <= 1 GROUP BY t.NAME, i.object_id, i.index_id, i.name, p.[Rows] ORDER BY p.[Rows] DESC; — Order by number of rows in descending order |
![]() |
![]() |
So there is 26GB of patch information alone. This is the patch info and drscription in all hundreds of languages.
SELECT TOP (1000) [XmlID] ,[RootElementXml] ,[RootElementType] ,[LanguageID] ,[RevisionID] ,[RootElementXmlCompressed] FROM [SUSDB].[dbo].[tbXml] |
![]() |
The single text of the RootElementXml is so large it would crash some text editors if you cut and paste just one single row.
Solving it without complex maintenance query or scripts. You may try the maintenance query further if that does not work.
– Decline Superseded Updates
– Regularly decline superseded updates to reduce the amount of metadata stored in the tbXML table
– Check the size of the full WID DB with SQL Management Studio
– Make sure you have the same size free on C: that would be 50GB+ to repair or try to reindex safely (in times of VMware this should be possible)
As a first step, try to get rid of some old stuff. Important: that will not free up the size of the WID database.
Run the WSUS Cleanup Wizard
- Open the WSUS console
- Go to Options
- Click on Server Cleanup Wizard
- Select options to delete unneeded content files, expired updates, and superseded updates (Skip first two for safe cleanup)
Make a backup of the DB before you trash it, maybe:
Try to shrink the DB:
In SQL query |
USE SUSDB; GO DBCC SHRINKDATABASE (SUSDB); GO |
Try to reinidex the SQL WID with this SQL query
Re–index and Shrink the WID Database This may take very long time to run |
USE SUSDB; GO SET NOCOUNT ON; — Rebuild or reorganize indexes based on their fragmentation levels DECLARE @objectid int; — Select indexes that need to be defragmented based on the following PRINT ‘Number of indexes to rebuild: ‘ + cast(@@ROWCOUNT as nvarchar(20)) PRINT ‘Estimating fragmentation: End. ‘ + convert(nvarchar, getdate(), 121) SELECT @numpages = sum(ps.used_page_count) — Declare the cursor for the list of indexes to be processed. — Open the cursor. — Loop through the indexes SELECT SELECT IF ((@density BETWEEN 75.0 AND 85.0) AND @fillfactorset = 1) OR (@fragmentation < 30.0) — Close and deallocate the cursor. IF EXISTS (SELECT * FROM @work_to_do) PRINT ‘Estimated number of pages freed: ‘ + cast(@numpages as nvarchar(20)) –Update all statistics |
![]() |
![]() |
![]() |
If you want this fix included in a maintenance task, maybe buy the products from:
AJTek-Adam-J-Marshall | Microsoft Learn
https://learn.microsoft.com/en-us/users/ajtek-adam-j-marshall/
Please see our other WSUS stability related blog posts:
WSUS: Unable to Take WSUS SQL DB offline or Dettach (SQL Locks) – www.butsch.ch
https://www.butsch.ch/post/wsus-unable-to-take-wsus-sql-db-offline-or-dettach-sql-locks/
WSUS: Windows Update Server. Most common Problems. FAQ – www.butsch.ch
https://www.butsch.ch/post/wsus-windows-update-server-most-common-problems-faq/