This monitor checks that the SCOM agent can connect to SQL via an OLEDB probe.
If this monitor is unhealthy, it means that the "NT Service\HealthService" SID is not configured as a login on the SQL server.
This monitor uses the System.OleDbProbe and attempts to run a test query. If the probe cannot connect to SQL it returns a "HRResult" with a negative value, and sets the monitor to Unhealthy.
Run one of the following tasks:
Create HealthService Login as SA Role SQL 20xx
Create HealthService Login as Low Priv in SQL 20xx
To create a login on the SQL server and apply the permissions per your requirements. You can grant the NT SERVICE\Healthservice to have the SysAdmin role, or you can grant lowest priv per the MP guide.
https://blogs.technet.microsoft.com/kevinholman/2016/08/25/sql-mp-run-as-accounts-no-longer-required-2/
Target | Microsoft.SQLServer.2016.DBEngine |
Parent Monitor | System.Health.ConfigurationState |
Category | Custom |
Enabled | True |
Alert Generate | False |
Alert Auto Resolve | False |
Monitor Type | Microsoft.SQLServer.RunAs.2016.Addendum.OLEDB.ConnectionCheck.MonitorType |
Remotable | True |
Accessibility | Public |
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.RunAs.2016.Addendum.OLEDB.ConnectionCheck.Monitor" Accessibility="Public" Enabled="true" Target="SQL2016Disc!Microsoft.SQLServer.2016.DBEngine" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.RunAs.2016.Addendum.OLEDB.ConnectionCheck.MonitorType" ConfirmDelivery="false">
<Category>Custom</Category>
<OperationalStates>
<OperationalState ID="OK" MonitorTypeStateID="ConnectionGood" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="ConnectionBad" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>14451</IntervalSeconds>
<ConnectionString>$Target/Property[Type="SQL2016Disc!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
</Configuration>
</UnitMonitor>