为复制日志扫描指定的起始日志序列号无效。
分发数据库复制表中存储的日志序列号(LSN)晚于事务日志中指定的 LSN,这是日志读取器代理程序下一步要读取的内容。这表示发布服务器与分发服务器之间的数据不一致,日志读取器代理程序进程不知道下一步读取哪一记录。如果从 MSrepl_transactions 复制表中手动删除了行,或者如果分发数据库启用了 sync with backup,但在未确保数据库之间的一致性的情况下还原了发布数据库,则可能出现此情况。
可能出现此情况的一些情形如下:
对发布数据库启用了 Sync with backup。在活动正在进行时和日志读取器代理程序正在运行时对发布数据库进行了备份。将发布服务器数据库还原为较早的备份。
对发布数据库未启用 Sync with backup。在活动正在进行时和日志读取器代理程序正在运行时对发布数据库进行了备份。还原发布服务器数据库。
重新初始化受影响的事务发布的所有订阅,以确保数据同步。
Target | Microsoft.SQLServer.2008.DBEngine | ||
Category | EventCollection | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | High | ||
Remotable | True | ||
Alert Message |
|
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.SQLServer.2008.EventProvider | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2008.BeginLSNSpecifiedForReplicationLogscanInvalidRule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="false" ConfirmDelivery="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<PublisherName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</PublisherName>
<EventNumber>18765</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.BeginLSNSpecifiedForReplicationLogscanInvalidRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>