此监视器检测日志传送源尚未在阈值(作为日志传送配置的一部分定义)内备份其日志的情况。
请注意,任何版本的 SQL Server Express 均不支持日志传送。
此监视器检测日志传送源尚未在阈值(作为日志传送配置的一部分定义)内备份其日志的情况。发生此情况时,此监视器将变为错误(严重)状态。一旦日志备份恢复并处于定义的阈值内,此监视器将恢复为成功(正常)状态。默认情况下,此监视器会在处于错误状态时生成警报。
SQL Server Express 版本默认禁用此监视器。
日志传送在超出备份阈值的情况下不同步。备份阈值是生成警报之前在日志传送备份作业之间允许等待的分钟数。此消息并不一定表示日志传送存在问题。相反,此消息可能表示存在以下问题之一:
备份作业未运行。导致此问题的可能原因包括:主服务器实例上的 SQL Server 代理服务未运行、作业被禁用或作业的计划已更改。
备份作业失败。导致此问题的可能原因包括:备份文件夹路径无效、磁盘已满或可能导致 BACKUP 语句失败的其他任何原因。
要解决此问题:
确保主服务器实例的 SQL Server 代理服务处于运行状态,同时启用了该主数据库的备份作业并安排它以适当的频率运行。
主服务器上的备份作业可能失败。在这种情况下,请查看备份作业的作业历史记录以寻找原因。
在主服务器实例上运行的日志传送备份作业可能无法连接到监视服务器实例以更新 log_shipping_monitor_primary 表。这可能是由于监视服务器实例和主服务器实例之间的身份验证问题引起的。
备份警报阈值可能包含错误的值。理想情况下,至少将该值设置为备份作业频率的三倍。如果在配置了日志传送并使之起作用之后更改了备份作业的频率,则必须相应地更新备份警报阈值的值。
当监视服务器实例离线并重新在线时,在警报消息作业运行之前不会使用当前值更新 log_shipping_monitor_primary 表。若要使用主数据库的最新数据更新监视表,请在主服务器实例上运行 sp_refresh_log_shipping_monitor。
在主服务器实例或监视服务器实例上,日期或时间不正确。这也可能生成警报消息。可能在其中一个服务器实例上修改了系统日期或时间。
注意: 这两个服务器实例的时区不同并不会导致问题。
SQL Server 2012 联机丛书中的日志传送主题:
http://go.microsoft.com/fwlink/?LinkId=789183
名称 | 说明 | 默认值 |
警报优先级 | 定义警报优先级。 | 正常 |
警报严重性 | 定义警报严重性。 | 错误 |
已启用 | 启用或禁用工作流。 | 是 |
生成警报 | 定义工作流是否生成警报。 | 是 |
Target | Microsoft.SQLServer.2012.Database | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.2SingleEventLog2StateMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.2012.Database.LogShippingSourceMonitor" Accessibility="Public" Enabled="true" Target="SQL2012Core!Microsoft.SQLServer.2012.Database" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="true">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Database.LogShippingSourceMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDescription$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="SourceNotBackedUp" MonitorTypeStateID="FirstEventRaised" HealthState="Error"/>
<OperationalState ID="SourceBackUpComplete" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<FirstComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</FirstComputerName>
<FirstLogName>Application</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">14420</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDescription</XPathQuery>
</ValueExpression>
<Operator>ContainsSubstring</Operator>
<Pattern>.$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$ </Pattern>
</RegExExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SecondComputerName>
<SecondLogName>Application</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">18265</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDescription</XPathQuery>
</ValueExpression>
<Operator>ContainsSubstring</Operator>
<Pattern>: $Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$,</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>