KAPes musings !

Archive for the ‘SQL-Query’ Category

WSUS Client Inventory

Posted by kapes on September 14, 2009

Download and install Microsoft SQL Server Management Studio Express on your WSUS 3 Server
Use Windows Authentication to connect to \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

Then run following query locally from WSUS server.

SELECT [Name]
,[IPAddress]
,[LastSyncResult]
,[LastSyncTime]
,[LastReportedStatusTime]
,[OSArchitecture]
,[Make]
,[Model]
,[BiosName]
,[BiosVersion]
,[BiosReleaseDate]
,[OSMajorVersion]
,[OSMinorVersion]
,[OSBuildNumber]
,[OSServicePackMajorNumber]
,[OSDefaultUILanguage]
FROM [SUSDB].[PUBLIC_VIEWS].[vComputerTarget]

if you are command line junkie use SQLCMD.exe

Prerequisite is : SQL Native client

Posted in SQL-Query, WSUS | Leave a Comment »

Lots of VERY useful SQL queries for MOM 2005

Posted by kapes on September 2, 2009

http://blogs.technet.com/kevinholman/archive/2007/10/18/useful-mom-2005-sql-queries.aspx

  • Queries to find out how old present data
  • Grooming the SCDW
  • Query to examine the last groom job and how long it took in the SCDW
  • Running the DTS job with latency
  • Faking the Onepoint database to think DTS is working in order to groom
  • Most common alerts in a Onepoint DB
  • To determine computers that are generating the most event data
  • To display the most common perf insertions

You get the idea 🙂

Posted in MOM-2005, Programming, SQL-Query | Tagged: , | Leave a Comment »

WSUS Approval History Report

Posted by kapes on September 2, 2009

SELECT UT.DefaultTitle as [Title]

,UT.DefaultDescription as [Description]

,[MsrcSeverity]

,[KnowledgebaseArticle] as [KB]

,[SecurityBulletin]

,[PublicationState]

,[UpdateType]

,[InstallationRebootBehavior]

,[ArrivalDate]

,[Action]

,[Deadline]

,UA.[CreationDate] as [Approved On]

,[AdministratorName] as [Approved By]

FROM [SUSDB].[PUBLIC_VIEWS].[vUpdateApproval] as UA left join [SUSDB].[PUBLIC_VIEWS].[vUpdate] as UT on UA.UpdateID = ut.UPDATeID

Where AdministratorName <> ‘WUS Server’

order by [Approved On]

Posted in SQL-Query, WSUS | Tagged: , | Leave a Comment »