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 

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Categories: Uncategorized

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
By: otoquero
Apr 9, 2008
7:36 am
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Sentinel Supported Troubleshooting Workflow