Issue
Empty Email body for Inspector reports run on a central server using PoSH
Cause
Stored Proc - [Inspector].[SQLUnderCoverInspectorReport] does not check if null returned when retrieving monitored server Information - this value is concatenated with the rest of the email body text rendering it all null.
Function - [Inspector].[GetServerInfo]
returns null If a row is not found in the [Inspector].[ServerInfo] table for a monitored server
To Reproduce
remove one of the rows in the table for a monitored server and run the Stored Proc to generate an email
workaround
Amend Line 360 in [Inspector].[SQLUnderCoverInspectorReport]
from
+[Inspector].[GetServerInfo](@Serverlist)
to
+ISNULL([Inspector].[GetServerInfo](@Serverlist),'--- no data ---')
Issue Empty Email body for Inspector reports run on a central server using PoSH
Cause Stored Proc - [Inspector].[SQLUnderCoverInspectorReport] does not check if null returned when retrieving monitored server Information - this value is concatenated with the rest of the email body text rendering it all null.
Function - [Inspector].[GetServerInfo] returns null If a row is not found in the [Inspector].[ServerInfo] table for a monitored server
To Reproduce remove one of the rows in the table for a monitored server and run the Stored Proc to generate an email
workaround Amend Line 360 in [Inspector].[SQLUnderCoverInspectorReport] from
+[Inspector].[GetServerInfo](@Serverlist)
to+ISNULL([Inspector].[GetServerInfo](@Serverlist),'--- no data ---')