Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Tuesday, March 20, 2012

Run sp_resyncmergesubscription to solve un-sync data problem between subscribers and Publisher

Hello,

I have set up a merge replication with 4 subscribers and a publisher on SS05 sp2 on 5 window servers. After running my application on the replication with big data for a while, the data in some of tables of subscriber are out of sync from the publisher. I tried to run sp_resyncmergesubscription to fix the problem according to http://doc.ddart.net/mssql/sql2000/html/replsql/replmon_9pwh.htm. The procedure run successfully. However, the problem is still exist.

Does anyone else have this problem. Please help!

Did you try @.resync_type = 0

When you ran sp_resyncmergesubscription procedure and @.resync_type = 0 is intense operation...

|||

I tried with @.resync_type = 2.

Here is the script I have run at the Publisher:

exec sp_resyncmergesubscription NULL, NULL, 'ds3263a', 'red-dalmssql103', 'ds3263c',2, '2007-04-06 10:00:00.000'

|||

What tables are out of sync?

Do you have filtering? Is the data same for all subscribers?

Do you have any user triggers on tables?

|||

It might have more than one table out of sync. However, I know for sure one user table is out of sync between subscribers. The data in the table, rn_schedule_task, is in sync status between publisher and owning subscriber. For example,

Table – rn_schedule_task:

TaskID

Status

1

succeeded

2

running

3

failed

The status of task 1 showing as “succeeded” on publisher and owning subscriber, but showing as “running” on other subscriber(s).

We do not have any user triggers on the table that I know.

|||

I am not sure how you have gotten into this situation.

But for the rows that are different, you could dummy update these rows.

You could do: update m_schedule_task set Status=Status where TaskID=<task ID of the row that is out of sync>

Then run the merge agent and hopefully it should converge this time.

Run sp_resyncmergesubscription to solve un-sync data problem between subscribers and Publisher

Hello,

I have set up a merge replication with 4 subscribers and a publisher on SS05 sp2 on 5 window servers. After running my application on the replication with big data for a while, the data in some of tables of subscriber are out of sync from the publisher. I tried to run sp_resyncmergesubscription to fix the problem according to http://doc.ddart.net/mssql/sql2000/html/replsql/replmon_9pwh.htm. The procedure run successfully. However, the problem is still exist.

Does anyone else have this problem. Please help!

Did you try @.resync_type = 0

When you ran sp_resyncmergesubscription procedure and @.resync_type = 0 is intense operation...

|||

I tried with @.resync_type = 2.

Here is the script I have run at the Publisher:

exec sp_resyncmergesubscription NULL, NULL, 'ds3263a', 'red-dalmssql103', 'ds3263c',2, '2007-04-06 10:00:00.000'

|||

What tables are out of sync?

Do you have filtering? Is the data same for all subscribers?

Do you have any user triggers on tables?

|||

It might have more than one table out of sync. However, I know for sure one user table is out of sync between subscribers. The data in the table, rn_schedule_task, is in sync status between publisher and owning subscriber. For example,

Table – rn_schedule_task:

TaskID

Status

1

succeeded

2

running

3

failed

The status of task 1 showing as “succeeded” on publisher and owning subscriber, but showing as “running” on other subscriber(s).

We do not have any user triggers on the table that I know.

|||

I am not sure how you have gotten into this situation.

But for the rows that are different, you could dummy update these rows.

You could do: update m_schedule_task set Status=Status where TaskID=<task ID of the row that is out of sync>

Then run the merge agent and hopefully it should converge this time.

Wednesday, March 7, 2012

Run at Subscriber Logon Problem

Hi all
Since I had some problems setting Push Merge Subscription I tried to 'Run
Agent at Subscriber' while setting it I clicked on 'Verify Subscriber'
button and I got the following error:
Server xyz is not prepared to run the offloaded agent
Error: 1040 The Agent failed to connect to the distributor due to the
following error: Login failed for user: NT Authority/Anonymous logon
I set all services to run under the Domain's Administrator account i.e. The
Main database Service and the SQL Agent Service
What is wrong, is there a separate service that runs on the distributor side
or else
Thank you for your advice,
Samuel Shulman
You have to configure the binary for remote activation. Type dcomcnfg from
the command prompt and the follow the below
1.. On the Applications tab, select Microsoft SQL Server Replication
Remote Merge Agent 8.0, and then click Properties.
2.. On the Security tab, select Use custom launch permissions, and then
click Edit.
3.. In the Registry Value Permissions window, add the account used to run
SQL Server Agent on the Distributor (for push subscriptions), or SQL Server
Agent on the Subscriber (for pull subscriptions), and then click OK.
4.. Click the Identity tab, select This user, and then enter the same user
account used by SQL Server Agent on the Distributor (for push
subscriptions), or SQL Server Agent on the Subscriber (for pull
subscriptions).
This is from remote agent activation in bol.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Samuel Shulman" <samuel.shulman@.ntlworld.com> wrote in message
news:uQaA9zy4GHA.3732@.TK2MSFTNGP05.phx.gbl...
> Hi all
> Since I had some problems setting Push Merge Subscription I tried to 'Run
> Agent at Subscriber' while setting it I clicked on 'Verify Subscriber'
> button and I got the following error:
> Server xyz is not prepared to run the offloaded agent
> Error: 1040 The Agent failed to connect to the distributor due to the
> following error: Login failed for user: NT Authority/Anonymous logon
> I set all services to run under the Domain's Administrator account i.e.
> The Main database Service and the SQL Agent Service
> What is wrong, is there a separate service that runs on the distributor
> side or else
> Thank you for your advice,
> Samuel Shulman
>

Run a Snapshot agent from a script or cmdline

I would like to be able to run a snapshot agent from a TSQL script or
from a cmd line. I have merge replication setup to several different
publications and would like to script all of the snapshot agents to run
on cmd rather on a schedule. I am using SQL Server 2000 with SP3.
Thank You in advance.
You could use sp_start_job from TSQL, or use the activeX control if you want
the command-line control.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .