SQL Query: Find All Machines With SQL Server Installed
If you want to find every machine in your Configuration Manager environment that has any edition of SQL Server installed — useful for a licensing audit, or just getting visibility over an estate you’ve inherited — you can do this with a query against the Installed Software inventory class, provided software inventory is enabled and has run against your clients.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%'
Run this against your Configuration Manager database, or build it as an SSRS report if you want it available on demand for your team. Bear in mind this relies on the “Add/Remove Programs” style display name reported by each install, so it’ll pick up SQL Server engine installs as well as related components like Management Studio and Reporting Services — if you only want full SQL Server engine instances, narrow the LIKE pattern further, or cross-reference against the SQL Server-specific inventory class if you’ve extended hardware inventory to collect it.
Telling Versions Apart from the Display Name (Updated for 2026)
SinceARPDisplayName0 returns the exact string each SQL Server installer registers, you can narrow this into a version-by-version breakdown without a separate query — just eyeball (or further filter on) the year in the name: “SQL Server 2019”, “SQL Server 2022”, and the current release, “SQL Server 2025” (GA’d 18 November 2025), will each show up distinctly. That’s useful for a licensing audit specifically, since support dates and licensing terms differ by version — an estate still showing 2012 or 2014 instances is worth flagging separately, as both are long past end of support.
Resources
Gear We Recommend
A few general tech accessories worth having alongside this.
Browse our General Tech Accessories picks on AmazonAs an Amazon Associate, TechyGeeksHome earns from qualifying purchases.