< Blog

How Many Software Updates Are Within My WSUS Database?

By Garth Jones

Recently I setup System Center Configuration Manager to work in an air gap environment. During this process I needed to determine the number of software updates (SU) that were within the Windows Software Update Services (WSUS) database. Being a bit of a SQL guy, I opened SQL Server Management Studio (SSMS) and queried the WSUS database.

If you ever find yourself in a similar situation, use this query to determine how many English SU are within your WSUS database.

To find other locales, simply change the locale ID number to the appropriate ID number. A list of locale IDs can be found on the following MSDN site. https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx

select

       CT.Title,

       C.DefaultTitle,

       Count(*)

from

       [PUBLIC_VIEWS].[vUpdate] U

       join [PUBLIC_VIEWS].[vClassificationText] CT on CT.ClassificationId = U.ClassificationId and  LocaleId = 1033

       join [PUBLIC_VIEWS].[vUpdateInCategory] UIC on U.UpdateId = UIC.UpdateId and UIC.CategoryType = ‘Product’

       join [PUBLIC_VIEWS].[vCategory] C on C.CategoryId = UIC.CategoryId

Group by

       CT.Title,

       C.DefaultTitle

order by

       CT.Title,

       C.DefaultTitle

 

I hope that you find this information useful.

Question Mark Key on Computer Keyboard