Technical Tip

Sentinel Query for WSUS

tip
Reads:

813

Score:
0
0
 
Comments:

0

Here is an example of a query to get information from WSUS. It shows data from the most populated tables.

 
 

SELECT ei.EventOrdinalNumber AS OrdinalNumber, ei.EventID AS EID, 
ei.EventNameSpaceID AS ENSID, ei.EventSourceID AS ESID,
ei.TimeAtTarget AS TimeAtTarget, ei.TimeAtServer AS TimeAtServer, 
ei.ComputerID AS ComputerID,  ei.AppName AS AppName, 
ct.TargetID AS TargetID, ct.LastSyncTime AS LastSync, 
ct.LastReportedStatusTime AS LastRep, ct.IPAddress AS IPAddress, 
ct.FullDomainName AS DomainName, ct.OSMajorVersion AS OSMAV, 
ct.OSMinorVersion AS OSMIV, ct.OSBuildNumber AS OSBN, 
ct.OSServicePackMajorNumber AS OSSPMAN, 
ct.OSServicePackMinorNumber AS OSSPMIN, ct.ComputerMake AS CMake, 
ct.ComputerModel AS CModel, ct.ProcessorArchitecture AS Architecture, 
ei.UpdateID AS UpdateID, u.LocalUpdateID AS LocalUpdateID, 
u.UpdateTypeID AS UpdateTypeID, ut.Name AS UpdateName,
uspc.SummarizationState AS SummState, tg.Name AS NameGroup, 
r.IsCritical AS Critical, pcclp.title AS Category 
FROM dbo.tbEventInstance AS ei 
LEFT OUTER JOIN dbo.tbUpdate AS u ON ei.updateid = u.updateid 
LEFT JOIN dbo.tbUpdateStatusPerComputer AS uspc ON ei.UpdateID = uspc.UpdateID 
LEFT JOIN dbo.tbComputerTarget AS ct ON uspc.TargetID = ct.TargetID 
LEFT JOIN dbo.tbUpdateType AS ut ON u.UpdateTypeID = ut.UpdateTypeID 
LEFT JOIN dbo.tbTargetInTargetGroup AS titg ON uspc.TargetID = titg.TargetID 
LEFT JOIN dbo.tbTargetGroup AS tg ON titg.TargetGroupID = tg.TargetGroupID 
LEFT JOIN dbo.tbRevision AS r ON u.LocalUpdateID = r.LocalUpdateID 
LEFT JOIN dbo.tbRevisionInCategory AS ric ON r.RevisionID = ric.RevisionID 
LEFT JOIN dbo.tbPrecomputedCategoryLocalizedProperty AS pcclp ON ric.CategoryID = pcclp.CategoryID 
WHERE ei.EventOrdinalNumber > 0 ORDER BY ei.EventOrdinalNumber ASC 





User Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <i> <strong> <cite> <code> <img><ul> <ol> <li> <div> <dl> <dt> <dd> <h1> <b> <strong> <h2> <h3> <pre> <table> <td> <tr> <th> <blockquote>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
5 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

© 2008 Novell, Inc. All Rights Reserved.