Client Management Suite

 View Only
  • 1.  sql table that has collection names in them

    Posted Mar 05, 2012 12:55 PM

    a while back (at a different job) i created collections..

    based off of add remove programs.. looked for software and version... then i hit that against a collection.

    I lost my folder that housed all of my sql code and I need to create this again for a deployment.

    I cannot seem to find a table that lists collections in it..

    the collection table lists
     

    Guid LegacySolutionGroupGuid LastUpdated LastUpdateEventDate CreatedDate ModifiedDate
    8EF277A2-E28D-4574-8D7D-0000DCE3C544 00000000-0000-0000-0000-000000000000 2/7/2007 11:11 2/7/2007 11:11 12/16/2006 21:38 2/7/2007 11:11

    and CollectionMembership table lists
     

    CollectionGuid ResourceGuid CreatedDate
    A8987BC2-7255-4226-B020-000414E9AB55 C3675209-CB8F-4EB3-9487-033F976BC314 4/23/2011 14:51 

    anyone know what table houses the collection names?

    thanks..

    Jeff
     



  • 2.  RE: sql table that has collection names in them

    Posted Mar 05, 2012 01:12 PM

    i see vcollection but cant get anywhere with getting it tied in.. what im trying to do is something like as follows...

     

    create a collection off of sql

     

    select Guid from vResource where ResourceTypeGuid in (select ResourceTypeGuid from ResourceTypeHierarchy where BaseResourceTypeGuid='493435f7-3b17-4c4c-b07f-c23e7ab7781f')

    and guid in

    ((Select t1.[Guid]

    From vcollection t1

    Where t1.name in('All Windows Workstations'))

    and t0.guid in

    (Select t0.[_ResourceGuid]

    From [inv_aex_os_add_remove_programs] t0

    Where t0.[name] LIKE 'McAfee VirusScan%' and t0.[version] like '8.7.%' or t0.[version] like '8.8.%'))

     

     

    if i run them individually it all works... each select from where statements...

     



  • 3.  RE: sql table that has collection names in them
    Best Answer

    Posted Mar 05, 2012 02:35 PM

    well i found it.. knew i had it somewhere on this huge internet...

    this is opposite of what i wanted but it works.. i bold and italic the NOT that needed to go.. then add versions and other stuff. but the top art.. first sectin is what i couldnt remember

    -- Should remove computers after inventory if it meets the requirements
    -- example is users in All Windows Desktop collection that do not have meeting center
    select Guid from vResource where ResourceTypeGuid in
    (select ResourceTypeGuid from ResourceTypeHierarchy
    where BaseResourceTypeGuid='493435f7-3b17-4c4c-b07f-c23e7ab7781f')
    and GUID IN
    (
    Select t2.[ResourceGUID]
    FROM [vCollection] t1 inner join
    [CollectionMembership] t2 on t1.GUID = t2.CollectionGUID inner join
    [Inv_Aex_AC_Identification] t3 on t2.ResourceGUID = t3._resourceGUID
    WHERE t1.[Name] = 'All computers'
    and t2.[ResourceGUID] NOT IN
    (
    Select a._ResourceGUID
    From [inv_aex_os_add_remove_programs] a
    Where a.[name] = 'Genesys Meeting Center'
    ))



  • 4.  RE: sql table that has collection names in them

    Posted Mar 05, 2012 05:09 PM

    Got this all figured out then?



  • 5.  RE: sql table that has collection names in them

    Posted Mar 06, 2012 11:08 AM

    eyup ... me, myself and I... talked through it and we are good!!!!

    HAH.. thanks