This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SQL or VIEW to select group-members

FormerMember
FormerMember

Hi,

can someone point me to a sql statment that generates a list of nodes which a member of a certain group?

@SW Team: For future use it might be good to have some views (i.e. one per objecttype) with these information.

Many thanks in advance,

Jörg

  • how about:

    SELECT *

    FROM [NetPerfMon].[dbo].[ContainerMemberSnapshots]

       inner join [NetPerfMon].[dbo].[Containers] on Containers.ContainerID = ContainerMemberSnapshots.ContainerID

    where [EntityDisplayName] = 'Node'

  • FormerMember
    0 FormerMember in reply to netlogix


    Thanks a lot netlogix!

    I was looking at the wrong end. this works.

    Kind regards, Jörg

  • This was really helpful! 

    How can I add both these statements together?

    SELECT containermembersnapshots.ContainerID

    FROM [NetPerfMon].[dbo].[ContainerMemberSnapshots]

       inner join [NetPerfMon].[dbo].[Containers] on Containers.ContainerID = ContainerMemberSnapshots.ContainerID

    where [EntityDisplayName] = 'Node' and

      ContainerMemberSnapshots.ContainerID in (53, 54, 55, 56)

    with this query..

    SELECT DISTINCT

      CustomPollerAssignment_1.NodeID

      ,Nodes.School

      ,Nodes.Caption AS 'HostNode Name'

      ,nodes.MachineType

      ,mac.mac as MAC

      ,(SELECT CustomPollerStatus.Status

    FROM

      CustomPollerStatus

    INNER JOIN

    CustomPollerAssignment ON CustomPollerAssignment.CustomPollerAssignmentID = CustomPollerStatus.CustomPollerAssignmentID

    WHERE

      (CustomPollerAssignment_1.NodeID = CustomPollerAssignment.NodeID) AND

      (CustomPollerAssignment.PollerID = '6E20C586-5577-4E97-A7BE-7C53703F8975')) AS 'Serial Number'

    FROM

      CustomPollerAssignment AS CustomPollerAssignment_1

    INNER JOIN

    CustomPollers ON CustomPollerAssignment_1.PollerID = CustomPollers.PollerID

    INNER JOIN

    Nodes ON CustomPollerAssignment_1.NodeID = Nodes.NodeID

    INNER JOIN

    CustomPollerStatus AS CustomPollerStatus_1 ON CustomPollerAssignment_1.CustomPollerAssignmentID = CustomPollerStatus_1.CustomPollerAssignmentID

    INNER JOIN NodeMACAddresses as MAC ON MAC.NodeID = Nodes.NodeID

    ORDER BY School

  • late reply, you can still try, hoow about this:

    SELECT

    caar.GroupName AS Group_Name, 

    caar.GroupStatusDescription AS Group_Status, 

    caar.GroupPercentAvailability AS Group_Availability, 

    caar.GroupMemberName AS Group_Member_Name, 

    caar.GroupMemberStatusDescription AS Group_Member_Status, 

    caar.GroupMemberPercentAvailability AS Group_Member_Availability 

    FROM SolarWindsOrion.dbo.Containers_AlertsAndReportsData caar WITH (NOLOCK)

    WHERE caar.GroupName = 'GroupName'

    Thanks.

    Mahidhar Vattem