SQL Version report

Good day, I need to obtain a report that shows the versions of SQL Server. I was not able to find any predefined report that shows this information. Any idea how I can get this information from BigFix?
I hope you can help me with your knowledge if you have had a similar situation. Thank you.

This is a perfect use case for BigFix Inventory :slight_smile:

I’ve done it with an analysis.

Relevance 1:
windows of operating system

Relevance 2:
version of operating system >= "5.1"

Relevance 3:
(exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" of native registry) OR (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer" of native registry) OR ((exists local mssql databases) AND (exists runnings whose(it = TRUE) of local mssql databases))

Property "CurrentVersion":
value "CurrentVersion" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion" of native registry

Property "Instance Names":
values "MSSQLSERVER" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" of native registry

Property "Patch Level":
values "PatchLevel" of keys "Setup" of keys ((it as string) of value "MSSQLSERVER" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" of native registry) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server" of native registry

Property "Edition":
unique values of (((it as string) of values "Edition" of keys "Setup" of keys ((it as string) of value "MSSQLSERVER" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" of native registry) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server" of native registry);((it as string) of values "EditionType" of keys "Setup" of keys ((it as string) of value "MSSQLSERVER" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" of native registry) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server" of native registry))

Property "Service Account":
(login account of it) of services whose (service name of it as lowercase = "mssqlserver")

Its not the most elegant solution and the code can probably be optimized but it gets the job done.