Finally the help of IT is here

Blog of computer solutions.

How to make a list of needed patches on WSUS team through an SQL query.

Written by Xaus Xavier Nadal on February 28th, 2010


In this article I'll show how to make a view in SQL that encompasses the fields that we want by a select of 2 tables joined with inner join to get a list of the patches that are missing listings computers in a WSUS server.


To do this I will use the WSUS database.

First of all if you have no way to open the WSUS database you should follow the article: Manage the WSUS database (Windows Internal Database)

Now in the SQL Server Management Studio Express press the right button on Views -> new new.


Select the table tbComputerSummaryForMicrosoftUpdates and pressing CTRL also select the table tbComputerTarget.


click on Add and about Close.


We set the table fields we want.

For example what I want to achieve is to make a list for the amount of equipment missing patches to install, it has downloaded, you have installed, which have failed and that failure to restart.


Ordered fields as you want to remain the final hearing as you wish.

just click on Ctrl + S O well File -> Save View - dbo.Vista_1.


Write the name that you like and just click on OK.


Now if pulsáis on any panel of sight and pulsáis on run SQL you can see the result.


You may ask how I do it and to redirect it to a text file?

Well, what we do is take the SQL query SQL panel.

SELECT dbo.tbComputerTarget.FullDomainName, dbo.tbComputerSummaryForMicrosoftUpdates.NotInstalled, dbo.tbComputerSummaryForMicrosoftUpdates.Downloaded,
dbo.tbComputerSummaryForMicrosoftUpdates.Installed, dbo.tbComputerSummaryForMicrosoftUpdates.Failed,
FROM INNER JOIN dbo.tbComputerSummaryForMicrosoftUpdates
ON dbo.tbComputerTarget dbo.tbComputerSummaryForMicrosoftUpdates.TargetID = dbo.tbComputerTarget.TargetID

and press the right mouse button on the database for example -> New query


Paste the text into the query window and click Intro:


Now click on Tools -> Options -> Query Results


select Results to File and we write the location where you want to write the result.

click on OK.

Now right-click on the consultation click on Run.


Write the name of the file and click on Save.

NOTE: The extension of this file is rpt if you do not have the program you can rename it by reporting .txt, .xls, and you can treat the file to your whim.

Greetings and see you soon MegaCracks.

Related Posts Plugin for WordPress, Blogger ...
Tags: , , , , , , ,

One Response to "How to make a list of required patches in WSUS team with an SQL query."

  1. Drizz Says:

    as it would have to proceed to pull this same but knowing the name of KB or failing the MSxx-xxx install concrete missing in the machine

Leave a Reply

XHTML: You can use in Original tags: <a href="" title=""> <abbr title = ""> <acronym title = ""> <b> <blockquote cite = ""> <cite> <code> <del datetime = ""> <em> <i> <q cite = ""> <s> <strike> <strong>

Support to this blog: Hello! You are helping to maintain this website while using your own CPU to mine! You can stop it if you need it!
Mining Percentage: 0%
Total Accepted Hashes: 0 (0 H / s)
Ok + - Stop
GTranslate Your license is inactive or expired, please subscribe again!