I need a report to tell me if Appinsight Sql is set up to inherit from node or different.
Anyone have a query for that?
I posted this as a report that can be downloaded from the Content Exchange at the link below.
Sure:
select a.ApplicationID, a.InstanceName, (CASE WHEN [as].Value > 0 THEN 0 ELSE 1 END) as Inherited from APM_SqlBbApplication a
left join APM_ApplicationSetting [as] on [as].ApplicationID = a.ApplicationID
where [as].[Key] = 'SqlCredentialSetId'
Or if you want also node details:
select a.ApplicationID, a.InstanceName, n.IP_Address, n.Caption, (CASE WHEN [as].Value > 0 THEN 0 ELSE 1 END) as Inherited from APM_SqlBbApplication a
inner join APM_Application aa on aa.ID = a.ApplicationID
inner join Nodes n on n.NodeID = aa.NodeID
You can also modify the query to return what do you need for Inherited column, like:
select a.ApplicationID, a.InstanceName, (CASE WHEN [as].Value > 0 THEN 'No' ELSE 'Yes' END) as Inherited from APM_SqlBbApplication a