On an existing MergePullSubscription (Subscriber: SQL Express) I call the SynchronizeWithJob() method. But each time, the following exception occures:
ExecutionFailureException:
The specified pull subscription is not configured with a synchronization agent job.
But how do I configure synchronization agent jobs in SQL Server 2005 Express?SynchronizeWithJob(), I think this is equivalent to executing sp_start_job to start the merge agent job. But since express has neither agent nor jobs, this will not work in the express case.
Instead try using SynchronizationAgent.Synchronize().
BOL should have more information and example. If not, the newest BOL should have proper information.|||Thank you for your tips.
But the problem is, that the MergePullSubscription class doesn't have a property SynchronizationAgent... (I use version 9.0.242.0 of Microsoft.SqlServer.Rmo.dll). Is there any newer version or does this property no longer exist?
|||Wouldnt this work?
MergePullSubscription mergepubllsub = new MergePullSubscription("subdb",
pubserver, "pubdb", "publication", subconn)
mergepubllsub.Create();
MergeSynchronizationAgent syncAgent = mergepubllsub.SynchronizationAgent
syncAgent.Synchronize();
|||Hi Mahesh!
You helped me!
I forgot to reference the Microsoft.SqlServer.Replication.dll assembly. Because the class MergeSynchronizationAgent is in this assembly, my code couldn't work.|||
Hi Mahesh,
I have been trying to use RMO to replicate SQL Express with SQL 2005 Server. I am able to create the Subcription and Register the Subscription in the Server. But I am not able to find out the MergeSynchronizationAgent object. I have already reference the Microsoft.SqlServer.Replication (Microsoft.SqlServer.Rmo.dll) but still I dont see the object. Can u help me please.
Thanks
Patrick Babu
|||In addition to Microsoft.SqlServer.RMO.dll, you will need to reference Microsoft.SqlServer.Replication.dll. The MergeSynchronizationAgent is in this dll. Try that see if it helps. Let me know if that doesnt solve your problem. We can trouble shoot more.|||Hi,
We have exactly a similar problem, but our reference are okay...
(MergeSynchronizationAgent throw an "Class not registered" exception)
Have you any idea ?
|||Can you register the dlls and see if that helps?
And at what point is it giving you this error. Compile time or run time?
|||Thanks for your reply.
This is a run time error on the MergeSynchronizationAgent obtained with the SynchronizationAgent property.
As it is not a compile time error, I think the dlls are already registred. If not, what is the register process ?
We also try to use the asynchronous method SynchronizeWithJob but we are waiting for the 'status'... But it is never refreshed...
|||We still not found a way to get the end of the merge...
Can you please help us ?
|||We are trying to go around this problem, with horrible solution...
If you are still alive, your help is welcome
|||I had a similar problem, When you add a reference through Visual Studio and under the .NET tab select "Microsoft.SqlServer.Replication" it is actually adding the RMO assembly. The only way I found to get a hold on the MergeSynchronizationAgent object is to browse to "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies" and add a reference to "Microsoft.SqlServer.Replication.dll" manually.
Hope this helps you out.
No comments:
Post a Comment