Microsoft 防火墙服务无法连接到 SQL 数据库

Microsoft.Forefront.TMG.The_Microsoft_Firewall_was_unable_to_connect_to_the_SQL_database.Rule (Rule)

如果 Microsoft 防火墙服务无法连接到 SQL 数据库,此规则将生成警报

Knowledge Base article:

摘要

当无法打开 OLEDB 连接对象时,防火墙服务将生成此警报。 防火墙服务使用 OLEDB 连接将记录插入至 SQL 数据库。 警报的第一个参数包含日志记录组件(防火墙或 Web 代理)的名称。

原因

在以下情况下,无法打开 OLEDB 连接:

解决方法

外部

有关 TMG 服务器日志的详细信息,请参阅 TMG 服务器联机帮助中的“日志”主题。

Element properties:

TargetMicrosoft.Forefront.TMG.Logging.SQLDatabase
CategoryEventCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Forefront.TMG.Rule.AlertGenerate.DS Default
WA WriteAction Microsoft.Forefront.TMG.Rule.AlertGenerate.WA Default

Source Code:

<Rule ID="Microsoft.Forefront.TMG.The_Microsoft_Firewall_was_unable_to_connect_to_the_SQL_database.Rule" Enabled="true" Target="Microsoft.Forefront.TMG.Logging.SQLDatabase" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Forefront.TMG.Rule.AlertGenerate.DS">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<EventsPattern>^(21203|21202)$</EventsPattern>
<EventType>1</EventType>
<SourcePattern>Microsoft Forefront TMG Firewall</SourcePattern>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Forefront.TMG.Rule.AlertGenerate.WA">
<AlertMessageId>$MPElement[Name="Microsoft.Forefront.TMG.The_Microsoft_Firewall_was_unable_to_connect_to_the_SQL_database.AlertMessage"]$</AlertMessageId>
<DomainName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/DomainDnsName$</DomainName>
<Priority>2</Priority>
<Severity>2</Severity>
</WriteAction>
</WriteActions>
</Rule>