views:

49

answers:

1

On a Publication (secondarily, a Subscription), is there a script or command I can run that verifies that the articles currently in place match what is expected and/or correct?

If changes were manually made to a replication database (i.e. a table's "MSMerge_ins_..." trigger is modified or deleted, causing replication of that table to function incorrectly), I want an easy way to detect that.

I want to avoid having to delete an entire publication, and re-adding it. If there's no other choice, then so be it.

Thanks!

A: 

So you are asking to check the replication objects, rather than the data itself? I'm not sure if there is an official way of doing that. There is a way of validating that the data matches though ... if there was something wrong with your replication objects, it would eventually result in either errors during replication, or divergent data, so running a regular replication validation might help achieve your aim.

The SQL Server 'replication validation' feature uses checksums to verify that the data on both sides is correct. You basically 'mark' a subscription for validation, and then it will automatically validate after the next merge.

See Validating Replicated Data for a general discussion of the feature. This page shows how to turn validation on.

codeulike