[Deprecated] MSSQL 2014: Workflow failed to connect to the target system

Microsoft.SQLServer.2014.Script_Failed_Database_Login (Rule)

A monitoring or discovery script does not have permissions to connect to the database or database is not accessible. This rule is considered to be obsolete in this Management Pack.

Knowledge Base article:

Summary

A monitoring or discovery script doesn’t have permissions to connect to the database or the database is not accessible. For detailed information about the script name and database name, please see the alert message.

This rule is considered to be obsolete in this Management Pack.

Causes

Discovery and monitoring scripts work under the “Microsoft SQL Server 2014 Discovery Run As Profile” and “Microsoft SQL Server 2014 Monitoring Run As Profile” profiles and should have an access to target SQL Server Instances and Databases. Accounts which are used in these profiles must be configured correctly.

Resolutions

To configure discovery and monitoring accounts properly, please see “Security Considerations” section in the Management Pack Guide.

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

No

Priority

Defines Alert Priority.

1

Severity

Defines Alert Severity.

2

Element properties:

TargetMicrosoft.SQLServer.2014.DBEngine
CategoryAlert
EnabledFalse
Event_ID4201
Event SourceHealth Service Script
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
MSSQL 2014: Workflow failed to connect to the target system
{0}
Event LogOperations Manager

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
Alert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2014.Script_Failed_Database_Login" Enabled="false" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Operations Manager</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">4201</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Health Service Script</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>ContainsSubstring</Operator>
<Pattern>[$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$][$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.ServerRole"]/InstanceName$:</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Alert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2014.Script_Failed_Database_Login.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>