Another log reader is replicating the database.
More than one current connection is trying to execute any of the following: sp_repldone, sp_replcmds, or sp_replshowcmds. The Log Reader Agent uses the stored procedures sp_repldone and sp_replcmds to locate and update information about replicated transactions in a published database. The stored procedure sp_replshowcmds is used to troubleshoot certain issues with transactional replication.
This error is raised in the following circumstances:
If the Log Reader Agent for a published database is running and a second Log Reader Agent attempts to run against the same database, the error is raised for the second agent and appears in the agent history.
In a situation where it appears there are multiple agents, it is possible that one of them is the result of an orphaned process.
If the Log Reader Agent for a published database is started and a user executes sp_repldone, sp_replcmds, or sp_replshowcmds against the same database, the error is raised in the application where the stored procedure was executed (such as sqlcmd ).
If no Log Reader Agent is running for a published database and a user executes sp_repldone, sp_replcmds, or sp_replshowcmds and then does not close the connection over which the procedure was executed, the error is raised when the Log Reader Agent attempts to connect to the database.
Note that in a situation where it appears there are multiple agents, one of them may be the result of some sort of orphaned process that doesn't show up as an extra job or agent in Management Studio.
The following steps can help you to troubleshoot the problem. If any step allows the Log Reader Agent to start without errors, there is no need to complete the remaining steps.
Check the history of the Log Reader agent for any other errors that could be contributing to this error. For information about viewing agent status and error details in Replication Monitor, see "How to: View Information and Perform Tasks for the Agents Associated With a Publication (Replication Monitor)" in SQL Server Books Online.
Check the output of sp_who for specific process identification numbers (SPIDs) that are connected to the published database. Close any connections that might have run sp_repldone, sp_replcmds, or sp_replshowcmds.
Restart the Log Reader Agent. For more information, see "How to: Start and Stop a Replication Agent (SQL Server Management Studio)" in SQL Server Books Online.
Restart the Agent service (bring it offline or online in a cluster) on the Distributor. If there is any possibility that a scheduled job could have executed sp_repldone, sp_replcmds, or sp_replshowcmds from any other instance, restart the Agent for those instances as well. For more information, see "Starting, Stopping, and Pausing SQL Server Agent Service" in SQL Server Books Online.
Execute sp_replflush at the Publisher on the publication database, and then restart the Log Reader Agent.
If the error continues to occur, increase the logging of the agent and specify an output file for the log. Depending on the context of the error, this could provide the steps leading up to the error and/or additional error messages. For more information, see "Replication Agents (Troubleshooting)" in SQL Server Books Online.
Name | Description | Default Value |
Enabled | Enables or disables the workflow. | Yes |
Priority | Defines Alert Priority. | 2 |
Severity | Defines Alert Severity. | 2 |
Target | Microsoft.SQLServer.2008.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
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.AnotherLogReaderIsReplicatingDatabaseRule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="true" 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>18752</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.AnotherLogReaderIsReplicatingDatabaseRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>