Hi,
I am trying to synchronize data between a publisher running in SQL Server 2000 enterprise edition and a subscriber running in MSDE 2000 using DMO with Merge ActiveX component. My program is in VB.NET.
Now, everytime I try to synchronize data, the changes at subscriber don't get reflected at publisher. Here is the code segment:
objMerge.ReinitializeSubscription(true)
objMerge.Initialize()
objMerge.Run()
objMerge.Terminate()
We are using dynamic filters with SUSER_SNAME(). However, the data for specific users filtered by SUSER_SNAME works fine while getting data from publisher to the subscriber.
Thanks.
You shouldn't be reinitializing. This is one way you can guarantee you will loose your Subscriber records.
Looking for a SQL Server replication book?
If you want to upload the Subscriber changes to the Publisher before the initialization runs use the bUploadBeforeReinit property of the ReInitializeSubscription method to true.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Hi,
I didn't get your answer. It says not to use ReinitializeSubscription and again it says use ReinitializeSubscription with bUploadBeforeReinit parameter set to true.
Please explain.
Thanks.
|||Hmm.. Sorry I seem to have missed that you were using objMerge.ReinitializeSubscription(true) in your first post. I somehow was under the impression you were doing this objMerge.ReinitializeSubscription() or objMerge.ReinitializeSubscription(false)
Basically what I was trying to ask you is why are you doing a reinitialization? You normally only do this if there has been a schema/publication change.
If there is no need to do a reinitialization I would not use this statement.
If you are doing a objMerge.ReinitializeSubscription(true) then transactions that occur on the Subscriber should not be deleted unless there are some conflicts. Does conflict viewer reveal anything?
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
|||Thanks Hilary for the suggestion. You are right. There were actually conflicts as we didn't find the Identity Range tab for articles enabled and hence could not set the proper identity range. We generated the publication script, manually set the identity
range to sp_addmergearticle and then created publication by running this script - now everything worked just fine even without using ReinitializeSubscription(True).
Now the question is why the identity range tab for the artcles were not active in the first place?
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment