Find servers with SQL 2k and 2k5

SELECT DISTINCT
    FCM.Name,
    OPSYS.Caption0,
    OPSYS.Version0,
    ARP.Displayname0
FROM
    dbo.v_FullCollectionMembership FCM
    JOIN dbo.v_GS_OPERATING_SYSTEM OPSYS on FCM.ResourceID = OPSYS.ResourceID
    join dbo.v_GS_SYSTEM SYS on SYS.ResourceID = FCM.ResourceID
    Join dbo.v_Add_Remove_Programs ARP on ARP.ResourceID = FCM.ResourceID
WHERE
    SYS.SystemRole0 = ‘Server’
    and ARP.Displayname0 in (‘Microsoft SQL Server 2005′,’Microsoft SQL Server 2000’) 

Leave a Reply

Your email address will not be published. Required fields are marked *