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

Good.

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.

SQLWSUS_6

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.

SQLWSUS_0

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

SQLWSUS_1

click on Add and about Close.

SQLWSUS_2

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.

SQLWSUS_3

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.

SQLWSUS_4

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

SQLWSUS_5

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

SQLWSUS_6

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,
dbo.tbComputerSummaryForMicrosoftUpdates.InstalledPendingReboot
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

SQLWSUS_7

Paste the text into the query window and click Intro:

SQLWSUS_8

Now click on Tools -> Options -> Query Results

SQLWSUS_9

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.

SQLWSUS_10

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!