ReplMerge.exe Vs. RMO
May 10, 2007
What are the pros and cons using replMerge.exe vs RMO? I'm specifically interested in error handling issues. I have a test app that calls replmerge and it works great, but if there are errors in the replication, does it pass back specific error information?
View 3 Replies
May 14, 2007
I have been successful in getting a Merge Replication to happen via the web using ReplMerge.exe, but unsuccessful in doing the same using RMO.
The following code is what I am using for merge replication via the web using the ReplMerge.exe and this is working fine.
replString = "C:Program FilesMicrosoft SQL Server90COMREPLMERG.EXE"
Dim procID As Integer
Dim newProc As Diagnostics.Process
Dim si As Diagnostics.ProcessStartInfo
si.WindowStyle = ProcessWindowStyle.Hidden
newProc.StartInfo = si
newProc = Diagnostics.Process.Start(replString, "-Publication pub_mergetest
-Publisher publishername
-Subscriber subscribername
-Distributor distributorname
-DistributorLogin sa
-DistributorPassword pwd
-DistributorSecurityMode 0
-PublisherDB MergeTest-Publisher
-SubscriberDB MergeTest-Subscriber
-PublisherLogin sa
-PublisherPassword pwd
-SubscriberLogin sa
-SubscriberPassword pwd
-SubscriptionType 1
-SubscriberSecurityMode 0
-LoginTimeOut 30
-ParallelUploadDownload 1
-QueryTimeOut 300")
procID = newProc.Id
newProc.WaitForExit()
Dim procEC As Integer = -1
If newProc.HasExited = -1 Then
procEC = newProc.ExitCode
End If
However, I cannot get the same to work via RMO. The error i get back is "The process could not connect to subscriber "subscribername". What am I missing? Any help and feedback is greatly appreciated.
Dim _mergeAgent As MergeSynchronizationAgent = New MergeSynchronizationAgent()
_mergeAgent.Publication = "pub_mergetest"
_mergeAgent.Publisher = "publishername "
_mergeAgent.Subscriber = "subscribername"
_mergeAgent.Distributor = "distributorname"
_mergeAgent.DistributorLogin = "sa"
_mergeAgent.DistributorPassword = "pwd"
_mergeAgent.DistributorSecurityMode = SecurityMode.Standard
_mergeAgent.PublisherDatabase = "MergeTest-Publisher"
_mergeAgent.SubscriberDatabase = "MergeTest-Subscriber"
_mergeAgent.SubscriberLogin = "sa"
_mergeAgent.SubscriberPassword = "pwd"
_mergeAgent.SubscriberSecurityMode = SecurityMode.Standard
_mergeAgent.SubscriptionType = SubscriptionOption.Pull
_mergeAgent.PublisherLogin = "sa"
_mergeAgent.PublisherPassword = "pwd"
_mergeAgent.PublisherSecurityMode = SecurityMode.Standard
_mergeAgent.LoginTimeout = 30
_mergeAgent.QueryTimeout = 300
_mergeAgent.UseWebSynchronization = True
_mergeAgent.InternetUrl = "https://###.###.###.###/virtualdirectory/replisapi.dll"
_mergeAgent.InternetLogin = "domainusername"
_mergeAgent.InternetPassword = "pwd"
_mergeAgent.InternetTimeout = 5000
_mergeAgent.Synchronize()
View 3 Replies
View Related