I'm tyring to get a list of all my devices, some of which are NCM licensed and some aren't. The query below has the answer, but won't show the nodes that aren't in NCM. Any input?
End state: I want a list of all devices within SolarWinds and have a link if there is a config file.
SELECT
n.IPAddress
,cn.NodeID
,n.Caption
,ca.Config
FROM Cirrus.Nodes cn
JOIN Orion.Nodes n ON cn.CoreNodeID = n.NodeID
JOIN Cirrus.ConfigArchive ca ON cn.NodeID = ca.NodeID
JOIN (
SELECT ca.NodeID, MAX(ca.DownloadTime) AS MostRecentDownload
FROM Cirrus.ConfigArchive ca
WHERE ca.ConfigType = 'Running'
GROUP BY ca.NodeID
) tbl1 ON ca.NodeID = tbl1.NodeID AND ca.DownloadTime = tbl1.MostRecentDownload
(credit: getting latest archived config )