Showing posts with label publisher. Show all posts
Showing posts with label publisher. Show all posts

Wednesday, March 7, 2012

Metadata cleanup has deleted metadata at the Subscriber incorrectly?

Hi,

We have Microsoft SQL Server 2005 SP1 based merge replication application. This system consist of 1 publisher/distributor and about 700 subscribers. Publisher is MS SQL Server 2005 standard SP1 and subscribers are mostly MS SQL Server Express SP1s.

We started this system in September last year with migrating data as region based with one area at time. Everything went well until January 2007 when over 500 users were using new system. What is even strange that most errors comes on areas which were moved to new system on week number 2 on 2007 (8.1.2007->)

I have double and cross checked that these publications have exact the same parameteters as working publications.

The error message which comes on subscriber is following:

The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload). (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199401) Get help: http://help/MSSQL_REPL-2147199401

When this error comes client subscription should not be expired yet. So subscription is expiring incorrectly earlier than expected. After reinit subcriber can syncronize without any errors. For now machines suffering of this error have been different machines so there is no certain information if this error is repeatable on same machine.

Real bad thing is that if user has't syncronized in regular basis there is possibility to that data may be lost because the reinit must be done without upload as error message says.

Regards,

Jouko

We have now installed SP2 to over 650 machines and we are still getting this error. So it seems obvious that SP2 do NOT fix this error. We have now open second time support case to Microsoft about this issue. First time we got answer to apply SP2 to all machines that are involved with replication.

Jouko

Meta Data Cleanup For Merge Repl.

I am wondering specifically when the changes on the Publisher are cleaned
up. I have implemented merge replication with each publication having a
retention time (set in sp_addmergepublication) of 18 months and a
@.max_disretention (set in sp_adddistributiondb) also at 18 months. Also I
have a system where there is 1 Subscription PER Publication. The
Subscribers can be disconnected for long periods of time (I'm hoping for
less than 18 months). Now the changes on the Publisher will be stored on
the Distributor and will wait until a PULL Subscriber connects to Merge the
changes (changes made on both sides). From what I understand the merge
agent controls the meta data and will clean up the stored changes on the
distributor depending on the Retention period of the publication. So at
each merge agent run, anything older than 18 months that whether or not it
has been merged will be cleaned up (the max_disretention gets rid of changes
that have not been applied to subscribers too). Is this basically how the
cleanup of changes works?
When a connection is made I have a script that can be run to reinitialize a
subscription. It basically runs the merge agent, starts the snapshot agent,
sets the subscription to be reinitialized, and then runs the merge agent
again to apply the snapshot. Will Reinitializing a subscription clean up
the changes for a publication, kind of override the retention period?
Any ideas as to when the Change log (change info stored for a merge) is
cleaned up?
thanks,
Nate
Oops, the Distribution DB doesn't do anything during merge replication so
min_distretention and max_distretention don't apply. Just the Retention
period of the Publications. Can anyone confirm that the MetaData is only
cleaned up by the merge agent using the Retention period? And, that the
data is not cleaned up when a subscription is reinitialized?
thanks,
nate

meta data cleanup

Hi
I am running a couple of sql 2000 SP3a servers with merge and snapshot
replication. One server acting as publisher and distributor and the rest
subscribers. On one of the server I have got the error below and have tried
most of the suggestions by msdn. This server has not crashed ever before or
any hardware problems. It has been running for a couple of months and no
problems. This has not happened no any of the other servers. Any
suggestions would be greatly appreciated as the only resolution I have left
is to bring up a new instance, setup replication and see if this would
resolve the issue. Thanx
Server: EASTSRV3
DBMS: Microsoft SQL Server
Version: 08.00.0760
user name: dbo
API conformance: 2
SQL conformance: 1
transaction capable: 2
read only: N
identifier quote char: "
non_nullable_columns: 1
owner usage: 31
max table name len: 128
max column name len: 128
need long data len: Y
max columns in table: 1024
max columns in index: 16
max char literal len: 524288
max statement len: 524288
max row size: 524288
[4/14/2005 12:57:26 PM]EASTSRV3.ICASData: {call sp_MSgetversion }
Percent Complete: 2
Connecting to Subscriber 'EASTSRV3'
Percent Complete: 3
Retrieving publication information
Percent Complete: 4
Retrieving subscription information
Percent Complete: 4
The merge process is cleaning up meta data in database 'HO_Master'.
Percent Complete: 4
The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
MSmerge_contents, and 0 row(s) in MSmerge_tombstone.
Percent Complete: 4
The merge process is cleaning up meta data in database 'ICASData'.
The merge process could not perform retention-based meta data cleanup in
database 'ICASData'.
Percent Complete: 0
The merge process could not perform retention-based meta data cleanup in
database 'ICASData'.
Percent Complete: 0
Category:NULL
Source: Merge Replication Provider
Number: -2147199467
Message: The merge process could not perform retention-based meta data
cleanup in database 'ICASData'.
Percent Complete: 0
Category:COMMAND
Source: Failed Command
Number: 0
Message: {call sp_mergemetadataretentioncleanup(?, ?, ?)}
Percent Complete: 0
Category:SQLSERVER
Source: EASTSRV3
Number: 11
Message: General network error. Check your network documentation.
Message posted via http://www.sqlmonster.com
Jayanthi from MS posted this before:
"The most common reason I can think of is that the query timed out. Sometime
retention based cleaup may need to cleanup a lot of rows and that can take
time. Rerunning the merge with a larger value for the querytimeout parameter
should fix this problem."
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul
Thanx for the reply.
I have played with the agent profiles aswell. From default to 1800. This
has been going on for like two days now no synch at all. I have tried to
reindex also as this was also one of the msdn suggestions.
Message posted via http://www.sqlmonster.com