Error Number 21036
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeOnline20132010Other VersionsRelated ProductsLibraryForumsGallery Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Errors in Merge Replication SQL Server > SQL Server Replication Question 0 Sign in to vote We are using SQL Server 2012 version 11.0.6020.0, we have setup merge replication on 2 SQL servers, the replication is running fine, but encounter 2 errors during load test. May I know the cause and how to solve the problems ? First error: Command attempted: {call sp_MSensure_single_instance (N'[JOB_NAME]', 4)} Error messages: The merge process could not connect to the Publisher. Check to ensure that the server is running. (Source: MSSQL_REPL, Error number: 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) Second error: Error messages: The merge process was unable to create a new generation at the 'Publisher'. Troubleshoot by restarting the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200994) A query executing on Publisher failed because the connection was chosen as the victim in a deadlock. Please rerun the merge process if you still see this error after internal retries by the merge process. (Source: MSSQL_REPL, Error number: MSSQL_REPL20245) Thx, Zen Tuesday, May 24, 2016 10:02 AM Reply | Quote Answers 0 Sign in to vote Hi Zen, Based on the first error message, there are some incomplete jobs for the same subscriptions, you can execute sp_who2 to check the process id that runs the job and then kill it. According to the second error message, there are deadlock issues in your server. You can troubleshoot deadlocks following the instructions in the following blogs. The Accidental DBA (Day 29 of 30): Troubleshooting Deadlocks L
a previous request by the sameagent. Agent message code 21036: Another distribution agent for the subscription (s) is running or the server is working on a previous request by the sameagent. August 27, 2009 rajbaraty Leave a comment Go to comments Error: Agent message code 21036. Another distribution agent for the subscription(s) is running or the server is working on a previous request by the same agent. Source of the error: We may notice Replication failure due to faulty distribution agent jobs. So, when we try to start the Distribution Agent job; the distribution agent job history details the error as shown above. This means the distribution agent is not running fine. So, where do we start to isolate the issue. WorkAround: One easy way https://social.technet.microsoft.com/Forums/sharepoint/en-US/7599f91c-d81c-4131-95ed-5151dc081e4a/errors-in-merge-replication?forum=sqlreplication of tackling this issue is by finding the processes running related to the distribution agent job. How? By using a simple query as shown below: But before that make sure to stop the job if running. (Most of the cases it would have been stopped) select * from master..sysprocesses where program_name = ‘Name_of_the_agent_job'; Note: Make sure to run this on the Distribution server. This will list all the active processes related to the agent job if any. Make sure to https://rajbaraty.wordpress.com/2009/08/27/agent-message-code-21036-another-distribution-agent-for-the-subscription-s-is-running-or-the-server-is-working-on-a-previous-request-by-the-same-agent/ kill that process and recheck again if any agent processes are active or not. Once confirmed that there are no processes running related to the agent job we can restart the agent job. This will be successful and no errors will be received. Note: The workaround presented above is only with respect to local environment and can be used as a workaround. But cannot guarantee the same. Make sure to check with your local team before trying this out. Instance 2: Another scenario where in I came across the above error. There can be instances where we might have configured distribution agents as part of SQL Agent jobs with different names running at different time intervals and have totally forgot the same. This only happens when we have our own configured and do not use the default jobs created. So always make sure to check the distribution agent jobs created specific to our need. Share this:EmailPrintTweetLike this:Like Loading... Related Categories: Replication Comments (1) Trackbacks (0) Leave a comment Trackback Nana Yaw June 3, 2014 at 9:42 pm Reply Thanks. It worked for me No trackbacks yet. Leave a Reply Cancel reply Enter your comment here... Fill in your details below or click an icon to log in: Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. (LogOut/Change) You are commenting using your Twitter account. (LogOut/Change) You are commenting using your
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home http://www.sqlservercentral.com/Forums/Topic1455013-1549-1.aspx » SQL Server 2008 » SQL Server 2008 High Availability » SQL Server 2008 Merge Replication issue SQL Server 2008 Merge Replication issue Rate Topic Display Mode Topic Options Author Message dakshinamurthy-655138dakshinamurthy-655138 Posted Tuesday, May 21, 2013 7:44 AM Old Hand Group: General Forum Members Last Login: Wednesday, September 14, 2016 5:36 AM Points: 330, Visits: 1,055 Hi,i am getting error number the below mentioned error for one of my database which is in replication, please help what needs to be done.Command attempted:{call sp_MSensure_single_instance (N'server1\SQLSERVE-DB1_Server1\SQLSERVE-6', 4)}Error messages:The merge process could not connect to the Publisher ' '. Check to ensure that the server is running. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199368)Get help: http://help/MSSQL_REPL-2147199368Another merge agent for the subscription or subscriptions is running, or the error number 21036 server is working on a previous request by the same agent. (Source: MSSQLServer, Error number: 21036)Get help: http://help/21036The merge process could not connect to the Publisher ' '. Check to ensure that the server is running.With RegardsDakshina Murthy Post #1455013 Joie AndrewJoie Andrew Posted Wednesday, May 22, 2013 3:55 AM SSC Eights! Group: General Forum Members Last Login: Thursday, August 4, 2016 3:02 PM Points: 949, Visits: 1,883 What is the status of the publisher? If you have SSMS on the local machine can you verify that you can connect to the subscriber and the publisher from it? Joie Andrew"Since 1982" Post #1455394 dakshinamurthy-655138dakshinamurthy-655138 Posted Wednesday, May 22, 2013 4:03 AM Old Hand Group: General Forum Members Last Login: Wednesday, September 14, 2016 5:36 AM Points: 330, Visits: 1,055 Yes from each of the DB server i can connect to DB server Post #1455400 Joie AndrewJoie Andrew Posted Wednesday, May 22, 2013 4:14 AM SSC Eights! Group: General Forum Members Last Login: Thursday, August 4, 2016 3:02 PM Points: 949, Visits: 1,883 Have you seen this TN forum po