Symantec Management Platform (Notification Server)

 View Only
  • 1.  Finding software for most recent inventory only

    Posted May 19, 2009 12:53 PM
    I have gone through several different methods of finding out what computers a certain software application is on.  All of the results want to give you every time that software was seen on every computer, and/or if it was ever on a certain computer.  so, you end up with sometimes hundreds of rows returned for the same computer (even if that software has been removed from the computer).  Mosty help I've seen here deals with trying to get a unique value, using SQL or whatever.  However, I do not just want a unique value, I want to know the results of the most recent software inventory ONLY (which would of course be unique).  I don't care to know that a certain computer had this software last year.

    Anybody have any idea how to get only these current results?  SQL is fine.


  • 2.  RE: Finding software for most recent inventory only

    Posted May 19, 2009 03:33 PM
    The data in the inventory tables should be the last data returned for the last time the inventory policy was executed that gathered that particular data class.  So if you're getting old data, I'd guess you might not be running inventory on a frequent basis?  Can you provide an example query where you're getting multiple rows back or historical data?

    As an example, something like the following:
    select v.[name] as [Computername], arp.[Name] as [Application Name], arp.Version
    from vcomputer v
    join Inv_AeX_OS_Add_Remove_Programs arp on v.guid = arp._resourceguid
    where v.IsManaged = 1
    and v.[Name] = 'Your Computer Name Here'

    where you insert  computername into the 'where' clause will return the most up to date add\remove programs data for that particular computer.  There is no other data unless you've turned on history that I know of for that data class.
    To see when this data was last returned, you can join into the resourceupdatesummary table like the following:

    select v.[name] as [Computername], arp.[Name] as [Application Name], arp.Version, rus.ModifiedDate
    from vcomputer v
    join Inv_AeX_OS_Add_Remove_Programs arp on v.guid = arp._resourceguid
    Join ResourceUpdateSummary rus on v.guid = rus.ResourceGuid
    and rus.InventoryClassGuid = 'D5297E5A-F56D-4F63-A52D-5A8F7EFBE6E9' --Add Remove Programs Data Class Guid
    where v.IsManaged = 1
    and v.[Name] = 'Your Computer Name Here'


  • 3.  RE: Finding software for most recent inventory only

    Posted May 19, 2009 04:26 PM
    Here's a common script that I've seen others use, and I am currently trying to make it useful.

    SELECT T0.[Name] AS 'Name', T1.[ProductName] AS 'ProductName', T1.[ProductVersion] AS 'ProductVersion', T0.[Guid] AS 'Guid' FROM [vResourceEx] T0 INNER JOIN [Inv_AeX_SW_Audit_Software] T1 ON T0.[Guid] = T1.[_ResourceGuid] WHERE T1.[ProductName] LIKE '%PRODUCTNAME%' ORDER BY T0.[Name] ASC




  • 4.  RE: Finding software for most recent inventory only

    Posted May 20, 2009 09:44 AM
    should be "T1.[File Name], T1.[File Path]"


  • 5.  RE: Finding software for most recent inventory only

    Posted May 20, 2009 09:44 AM

    The query you posted gets the product from the file scan table.  IMO, I try to query the Add Remove programs data as a first attempt at reporting on software installed, then if I have issues finding applications in there, I'll try to report on it through the Audit Software table.  Why you ask?  Well, and keep in mind this is my opinion, that table is usually huge and quite slow to query on.  Also, you're reporting on more than what you're probably interested in, which is why people say you want to put a specific software in your where clause.  If you put in '%Microsoft Project%' as an example, you're going to get all the little components that comprise the application Microsoft Project.  I find it easier to just report on Add Remove Programs and see the machine has MS Project installed.  Also, my guess is you're not showing historical data, but rather you are showing a result for each file found on the machine.  Add "T1.[File Name], T1.[il Path]" to your select statement and you'll see the files being reported on along with your product name.  Sometimes its just the old install files being found, which doesn't necessarily indicate its actually installed.  I hope this helps out