Symantec Management Platform (Notification Server)

 View Only
  • 1.  Filter for computers using Primary User?

    Posted Mar 04, 2015 07:46 AM

    Hi,

    I'm trying to create a computer filter where the Primary User ID contains "TRP" from the code below, but with no success... What's wrong?

     ----
    SELECT
       [Guid],
       [Name]
    FROM
       [vComputer] 
    WHERE
      [vComputer].[Primary User] like '%TRP'
     ----

    The error message is this:

      Unable to save the filter. An unexpected error has occurred. Check logs for more details.
    This DataSource is not in a runnable state.


  • 2.  RE: Filter for computers using Primary User?
    Best Answer

    Posted Mar 04, 2015 07:53 AM

    When creating a filter, you'll only need the field Guid and no other column. The Primary User column in the view vComputer is actually named "User", and not "Primary User".



  • 3.  RE: Filter for computers using Primary User?

    Posted Mar 04, 2015 09:08 AM

    Hi

    I dont think the column Primary User is available in the vComputer view, I might be wrong though.

    The new silverlight interface (7.5 sp1 and later) is quite handy when it comes to creating filters.

    This is the resolved query I got when using the report builder in 7.5 console (pre sp1 though, but it should work in sp1 aswell):

    SELECT
       [vri1_Computer].[Guid],
       [vri1_Computer].[Name]
    FROM
       [vRM_Computer_Item] AS [vri1_Computer]
          LEFT OUTER JOIN [Inv_AeX_AC_Primary_User] AS [dca2_AeX AC Primary User]
             ON ([vri1_Computer].[Guid] = [dca2_AeX AC Primary User].[_ResourceGuid])
    WHERE
       (
          ([dca2_AeX AC Primary User].[User] LIKE N'%TRP')
       )



  • 4.  RE: Filter for computers using Primary User?

    Posted Mar 04, 2015 10:37 AM

    All of a sudden the filter just works. Thanks Rafael! :-)



  • 5.  RE: Filter for computers using Primary User?

    Posted Apr 02, 2015 02:39 PM

    Perhaps this is more complete

    SELECT vc.Name AS Host, vu.Name AS UserName, vu.Department AS Departamento, vu.[Job Title] AS Cargo
    FROM vComputer vc
    RIGHT JOIN (SELECT DISTINCT Name FROM vComputer) AS vc1
    ON vc1.Name = vc.Name
    INNER JOIN vUser vu ON vc.[User] = vu.Name

    with software

     

    SELECT vc.Name AS Host, arp.DisplayName AS Software, arp.DisplayVersion AS Versão, vu.Name AS UserName, vu.Department AS Departamento, vu.[Job Title] AS Cargo
    FROM vComputer vc
    RIGHT JOIN (SELECT DISTINCT Name FROM vComputer) AS vc1
    ON vc1.Name = vc.Name
    INNER JOIN Inv_AddRemoveProgram arp ON vc.Guid = arp._ResourceGuid
    INNER JOIN vUser vu ON vc.[User] = vu.Name