監視或探索指令碼沒有連接到資料庫的權限,或無法存取資料庫。
監視或探索指令碼沒有連接到資料庫的權限,或無法存取資料庫。如需指令碼名稱和資料庫名稱的詳細資訊,請參閱警示訊息。
探索及監視程式碼在 "Microsoft SQL Server 2014 Discovery Run As Profile" 及 "Microsoft SQL Server 2014 Monitoring Run As Profile" 設定檔下運作,且應可存取目標 SQL Server 執行個體與資料庫。必須正確地設定用於這些設定檔的帳戶。
為了正確地設定探索和監視帳戶,請參閱《管理組件指南》中的<安全性考量>一節。
名稱 | 描述 | 預設值 |
已啟用 |
| 是 |
產生警示 |
| 是 |
優先順序 |
| 1 |
嚴重性 |
| 2 |
Target | Microsoft.SQLServer.2014.DBEngine | ||
Category | Alert | ||
Enabled | True | ||
Event_ID | 4201 | ||
Event Source | Health Service Script | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Operations Manager |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
Alert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2014.Script_Failed_Database_Login" Enabled="true" 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>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>