[Deprecated] Run As Account does not exist on the target system, or does not have enough permissions

Microsoft.SQLServer.2008.Script_Failed_Database_Login (Rule)

A monitoring or discovery script doesn’t have permissions to connect to the database. 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. For detailed information about the script name and database name, please see the alert description.

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

Causes

Discovery and monitoring scripts work under the “SQL Server Discovery Account” and “SQL Server Monitoring Account” profiles. 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.2008.DBEngine
CategoryAlert
EnabledFalse
Event_ID4001
Event SourceHealth Service Script
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Run As Account does not exist on the target system, or does not have enough permissions
{0}
Event LogOperations Manager

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2008.Script_Failed_Database_Login" Enabled="false" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" ConfirmDelivery="true" Remotable="true" Priority="Normal">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider" RunAs="SQL!Microsoft.SQLServer.SQLDefaultAccount">
<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">4001</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="SQL!Microsoft.SQLServer.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.2008.Script_Failed_Database_Login.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>