Error message in Merge replication "Call sp_MSensure_single_instance"

Gao Peng 21 Reputation points
2022-12-27T03:04:53.163+00:00

In replication monitor, I read an error message from a merge replication
"
Command attempted:
{call sp_MSensure_single_instance (N'IZT4N73LFYS1BMZ\FLAG2-flagdata-Flag Data Tables-WIN-5PNEMH7B8TU-642', 4)}

Error messages:
The merge process could not connect to the Publisher 'IZT4N73LFYS1BMZ\FLAG2016:flagdata'. Check to ensure that the server is running. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199368)
Get help: http://help/MSSQL_REPL-2147199368
Another merge agent for the subscription or subscriptions is running, or the server is working on a previous request by the same agent. (Source: MSSQLServer, Error number: 21036)
Get help: http://help/21036
"

Then I check the job list in Subscriber's SSMS/SQL Server Agent node, there is no duplicate job so presumably there should be any merge agent running.
And everytime before I start this job, I always stop it first.

Can anyone tell me how to launch an investigation on if there is a hidden subscription/merge agent job. I did delete subscriptions few times, that is real. I should have removed those agent jobs as well.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,571 Reputation points
    2022-12-27T07:36:45.157+00:00

    Hi @Gao Peng ,

    When you dropped the subscription and recreated it again the subscriber was able to run the replication agent again.
    In addition, please refer to this blog: https://techcommunity.microsoft.com/t5/sql-server-support-blog/how-to-find-sql-server-replication-related-jobs-and-t-sql/ba-p/1530496
    Hope this would give you some help.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.