Monday, March 12, 2012

Failed Data Validation

Hi,
I am constantly getting data validation failures happening on the same
table when reinitialise all subscriptions.
This has been happening for some time now and taking a new publisher
snapshots does not fix the problem. Normally when the subscriber syncs
again it clears the error but this is not fixing the problem.
Can anyone advise me on what measures I can take to fix this.
Regards,
Ben
You get validation failure after a snapshot? I'd be interested to do a
DataCompare (RedGate) to see which rows are different. Also, can you explain
the setup a little more - eg do you have any transformations going on, which
validation are you using, do you have filters, is the schema the same on
publisher and subscriber...
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||On Mar 6, 7:10 pm, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> You get validation failure after a snapshot? I'd be interested to do a
> DataCompare (RedGate) to see which rows are different. Also, can you explain
> the setup a little more - eg do you have any transformations going on, which
> validation are you using, do you have filters, is the schema the same on
> publisher and subscriber...
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com
Hi Paul,
We are using Merge Replication running on Windows 2003 Server MS SQL
2000
SP4. All subscribers are running SQL Desktop Engine SP4 on either
Windows
2000 or XP.
We don't have any transformation going on, I'm using the binary
checksum
option from EM for validation. No filters have been applied, and the
schema
is the same on both the Publisher and subscriber.
Just to give you a clue on what we use replication for, I have built
an MS
Access application that salespeople (subscribers) use to quote
customers
with, the data is then sync back to the main server throughout the
day. Also
some uses connect directly to the publisher data via my application.
So we
have data modifications happening both ways.
Also I have never run sp_addtabletocontents or sp_mergecleanupmetadata
to
clean up the data, is this advised?
Regards,
Ben
|||I'd run dataCompare to check out the non-converged rows. It may be that you
have used a means of adding data to either the publisher of the subscriber
which doesn't fire the merge triggers - doing a fast load in DTS or a BULK
INSERT can do this. If this is the case, you can tell by checking
msmerge_contents and looking for the guid ie if you can't find an entry in
the metadata table, this indicates that sp_addtabletocontents will resolve
the situation, and future imports must be set to fire the merge triggers.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||On Mar 7, 8:43 pm, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> I'd run dataCompare to check out the non-converged rows. It may be that you
> have used a means of adding data to either the publisher of the subscriber
> which doesn't fire the merge triggers - doing a fast load in DTS or a BULK
> INSERT can do this. If this is the case, you can tell by checking
> msmerge_contents and looking for the guid ie if you can't find an entry in
> the metadata table, this indicates that sp_addtabletocontents will resolve
> the situation, and future imports must be set to fire the merge triggers.
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com
Thanks for your help, I will try this. Do you advise I do a
mergecleanupmetadata regularly as well?
|||On Mar 7, 8:43 pm, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> I'd run dataCompare to check out the non-converged rows. It may be that you
> have used a means of adding data to either the publisher of the subscriber
> which doesn't fire the merge triggers - doing a fast load in DTS or a BULK
> INSERT can do this. If this is the case, you can tell by checking
> msmerge_contents and looking for the guid ie if you can't find an entry in
> the metadata table, this indicates that sp_addtabletocontents will resolve
> the situation, and future imports must be set to fire the merge triggers.
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com
I did a data compare using SQL DataCompare by Red Gate and the
problematic table cam up identical when compared.
|||On Mar 7, 8:43 pm, "Paul Ibison" <Paul.Ibi...@.Pygmalion.Com> wrote:
> I'd run dataCompare to check out the non-converged rows. It may be that you
> have used a means of adding data to either the publisher of the subscriber
> which doesn't fire the merge triggers - doing a fast load in DTS or a BULK
> INSERT can do this. If this is the case, you can tell by checking
> msmerge_contents and looking for the guid ie if you can't find an entry in
> the metadata table, this indicates that sp_addtabletocontents will resolve
> the situation, and future imports must be set to fire the merge triggers.
> Cheers,
> Paul Ibison SQL Server MVP,www.replicationanswers.com
Actually on further investigation I found a difference in a trigger in
the problematic table that doesn't exist in any other table.
Difference as follows:
Trigger Name: upd_431EA2A8618C419AA64343A3B2913E2E (Trigger created by
replication)
Line that is different:
Subscriber: execute master..xp_mapdown_bitmap 0x000020, @.bm
output
Publisher: execute master..xp_mapdown_bitmap 0x0000200000000038,
@.bm output
Could this be the problem? If so how can I resolve it?
|||The merge agent will do this automatically so typically I'd not run this
manually.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||Interesting - as well as identical rows, no extra rows at all then on either
side? If the tables are indeed identical, it's really difficult to see how
the validation is different - perhaps you could script a binary_checksum
query yourself that returns the pk value and the binary checksum. Do this on
each server then compare the results (full outer join and lok for nulls)
which will return the mismatched records. If this also seems the same (I
suspect it will as my guess is that this is what Redgate itself uses) then
I'd raise a PSS call as you might have discovered a bug.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
|||Tthe extended stored proc is undocumented so it's difficult to know if this
is relevant at all. If you follow the testing I mentioned in your other
thread we should have some more info and if it leads to making a PSS call,
add in this bit of info.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

No comments:

Post a Comment