Showing posts with label synchronize. Show all posts
Showing posts with label synchronize. Show all posts

Monday, March 26, 2012

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNairScott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:
> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNair
Scott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:

> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Merge Agents - two-tier question

We've got a SQL server in the US and another in China, with several merge
agents set up to synchronize between the two boxes. Occasionally the agent
will stop itself, with an error message of "Unable to query subscriber" (or
something similar; I don't have the error in front of me right now
unfortunately). The ironic thing is that although it reports an error, it
doesn't show an error-style "Big Red X" for the agent, and instead shows a
typical "Stopped Agent" icon, as if I had right-clicked it and chosen
"Stop" manually.
My questions are these:
1. Why does it stop itself? My guess would be that packet loss between the
two boxes causes replication to fail occasionally but that's only a guess.
And why does it look as though it was stopped manually?
2. Is there a way to automatically restart stopped agents? Worst-case
scenario, I could write something to stop/restart the SQL Server Agent
process, but ideally I'd like to have it set up so that within a couple of
minutes of it stopping, it restarts itself.
Any help would be greatly appreciated.
Regards,
Scott McNairScott McNair <scott.mcnair@.sfmco.takethispartout.com> wrote in
news:Xns959E5CA224D06sfmco@.207.46.248.16:

> My questions are these:
> 1. Why does it stop itself? My guess would be that packet loss
> between the two boxes causes replication to fail occasionally but
> that's only a guess. And why does it look as though it was stopped
> manually?
> 2. Is there a way to automatically restart stopped agents? Worst-case
> scenario, I could write something to stop/restart the SQL Server Agent
> process, but ideally I'd like to have it set up so that within a
> couple of minutes of it stopping, it restarts itself.
Bump.
We've got a large number of them that stopped themselves today. Some of
them are straight-out "Failed" items, and some are listed as "Succeeded",
but are actual failures. Examples:
Succeeded / The Processcould not query row metadata at the 'Subscriber'.
Failed / The process could not make a generation at the 'Subscriber'.
Succeeded / The process could not enumerate deletions at the 'Subscriber'.
We had six items stop themselves last night, out of 24 items, and this is
typical - around 25% failure rate.

Friday, March 23, 2012

Merge ActiveX component removes subscriber records

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