[即將淘汰] 目標系統上沒有執行身分帳戶,或其權限不足

Microsoft.SQLServer.2012.Script_Failed_Database_Login (Rule)

監視或探索指令碼無權連線到資料庫。此管理組件已淘汰此規則。

Knowledge Base article:

摘要

監視或探索指令碼沒有連接到資料庫的權限。如需有關指令碼名稱和資料庫名稱的詳細資訊,請參閱警示描述。

此管理組件已淘汰此規則。

原因

探索和監視指令碼是根據「SQL Server 探索帳戶」和「SQL Server 監視帳戶」設定檔運作。用於這些設定檔的帳戶必須正確設定。

解決方式

為了正確地設定探索和監視帳戶,請參閱《管理組件指南》中的<安全性考量>一節。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

優先順序

定義警示優先順序。

1

嚴重性

定義警示嚴重性。

2

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
CategoryAlert
EnabledFalse
Event_ID4001
Event SourceHealth Service Script
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
目標系統上沒有執行身分帳戶,或沒有足夠的權限
{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.2012.Script_Failed_Database_Login" Enabled="false" Target="SQL2012Core!Microsoft.SQLServer.2012.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.2012.Script_Failed_Database_Login.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>