The merge process could not initialize the Pub...

  • Context:

    Merge replication with central publisher and a single remote subscriber

    Pull subscription with Continuous synchronization

    Problem:

    The merge process could not initialize the Publisher '<Server>:<DB>'.

    Attempt/Finding:

    We have configured another replication with same configuration for testing with enabling merge agent to log information in output file with verbose level 2.

    After functioning properly for quite a some time, it again has produced the following problem:

    The merge process could not initialize the Publisher '<Server>:<DB>'.

    When we look into the log, the last step and actual error occured are:

    1. Step from Subscriber to Publisher:

    master..sp_MScheck_agent_instance N'Some Agent/Job Name', 4

    2. Error occured during the step:

    Another merge agent for the subscription(s) is running.

    When look into the list of Job through Enterprise Manager Management/SQL Server Agent/Jobs, we have not found any name like 'Some Agent/Job Name'. However, when again through Enterprise Manager we look into the list of current processes running, it list multiple process for the 'Some Agent/Job Name' trying to running different TSQL Batch commands.

    It looks to us as kind of Orphan Agent/Job created due to some problem and caused to stop actual Merge Agent/Job. This is because when we kill all the processes of that Orphan Agent/Job and running merge agent on subsriber again, it starts functioning again but not for long and we keep experiencing the same problem again.

    We'll appreciate any help to fix this problem.

    Regards,

    IP

  • Which version of SQL Server do you run, which Service Pack. I've seen my share of replication problems but never experienced orphaned agents. Do you allow anonymous subscriptions? What is the full error message. It should be more than

    quote:


    The merge process could not initialize the Publisher '<Server>:<DB>'


    [font="Verdana"]Markus Bohse[/font]

  • Hi,

    quote:


    Which version of SQL Server do you run, which Service Pack. I've seen my share of replication problems but never experienced orphaned agents. Do you allow anonymous subscriptions? What is the full error message. It should be more than

    quote:


    The merge process could not initialize the Publisher '<Server>:<DB>'



    We are using SQL Server Enterprise Edit with Service Pack 3 both on publisher/subscriber. And no we have'nt configured for Anonymous Subscription.

    The merge process could not initialize the Publisher '<Server>:<DB>', here <Server> is representing our Publisher Server (CFSQL)and <DB> (CFDMSForReplTest) is for Publication. It shows only this message while log file show another message after this message. The message is:

    'Another merge agent for the subscription(s) is running.'

    This message gave me the clue so I found out that orphan agent running on publisher.

    Also that 'Some Agent/Job Name' I mentioned earlier is respresenting SQL Server Agent Job name that seems to me as dervided from the actual Merge Agent name (actual SQL Server Agent Job for merge agent) but suffixed with another integer value. Following is the actual agent name that runs on subscriber and orphan agent that runs on publisher:

    Actual:

    CFSQL-CFDMSForReplTest-CFDMSForReplTestPub-CFUSSQL-CFDMSUSForReplTest- 0

    Orphan:

    CFSQL-CFDMSForReplTest-CFDMSForReplTestPub-CFUSSQL-19

    Hope this makes things more visible.

    Regards,

    IP

    Edited by - iypatel on 06/25/2003 02:59:08 AM

    Edited by - iypatel on 06/25/2003 09:52:45 AM

  • Is it possible that someone had torn down replication, but not done a full cleanup job, including sp_removedbreplication? Have you tried completely rebuilding? I have seen this before and rebuilding has helped in most cases...

  • Hi,

    quote:


    Is it possible that someone had torn down replication, but not done a full cleanup job, including sp_removedbreplication? Have you tried completely rebuilding? I have seen this before and rebuilding has helped in most cases...


    I have configured a new publication and subscription but it couldn't help.

    Regards,

    IP

  • Did you delete that orphan merge job?

  • Hi,

    quote:


    Did you delete that orphan merge job?


    Yes-I deleted the orphan merge job.

    After again I reconfigured replication yesterday, the problem is not produced till now. As far as I know, I haven't made any changes. So now I'm in wait and see state while searching in other forums perhape someone came across the situation ealier.

    Many thanks for asking.

    Regards,

    IP

  • Hi,

    it seems that the client does not have the rights to read from the snapshot-folder.

    During the setup of the publisher you have to choose the initial snapshotfolder (Default setting is something like this \\ServerName\d$\Program Files\MSSQL\DATA\ReplData). SQL-Server always uses this system link to d$ to which a 'normal' user has no rights to connecting to. So the publisher can not initialize the snapshot.

    So make sure that you put a share directly on the repldata-folder. Something like this: \\ServerName\ReplData$.

    Make sure, that the user which is used for running the SQL-ServerAgent and the MSSQL-Server, and the client users have full rights on that share and on the files in that folder and subfolders.

    Now it should work.

    I hope this helps.

    Thorsten

    Germany

  • Hi,

    quote:


    Hi,

    it seems that the client does not have the rights to read from the snapshot-folder.

    During the setup of the publisher you have to choose the initial snapshotfolder (Default setting is something like this \\ServerName\d$\Program Files\MSSQL\DATA\ReplData). SQL-Server always uses this system link to d$ to which a 'normal' user has no rights to connecting to. So the publisher can not initialize the snapshot.

    So make sure that you put a share directly on the repldata-folder. Something like this: \\ServerName\ReplData$.

    Make sure, that the user which is used for running the SQL-ServerAgent and the MSSQL-Server, and the client users have full rights on that share and on the files in that folder and subfolders.

    Now it should work.

    I hope this helps.

    Thorsten

    Germany


    Thanks for you suggestions though I had focused on these configuration requirements at the beginning because without these replication would have not been started.

    I'm almost about to reach to the reason for the problem that seems to me bit different than what we're thinking.

    It is leading me towards where there really are orphan processes but these processes became orphan because somehow they lost the contact with their creators/parents, perhaps due to long network failure. I'm still on narrowing it down.

    Regards,

    IP

    Pakistan/UK

  • I have encountered the same issue in production and by killing the oprhan session connection at publisher, issue resolved.Thanks...:-)

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply