Query for all machines with SQL installed using Installed Software
If you wish to run a SQL query against your SCCM database to find all machines with SQL installed, then you can use this SQL query below:

 SELECT     
   SYS.Name0,   
   SYS.SystemRole0,   
   SYS.SystemType0,   
   SYS.Domain0,   
   SOF.ARPDisplayName0   
 FROM       
   v_GS_INSTALLED_SOFTWARE SOF  
   INNER JOIN v_GS_SYSTEM SYS  
   ON SOF.ResourceID = SYS.ResourceID   
 where   
   ARPDisplayName0 like '%SQL%'   

If you have any problems with this, please leave a comment below.

Labels: , , ,