I am using merge replication in SQL 2012. Some of my merge articles use column level tracking.

I am trying to understand how to use the 'lineage', and 'colv1' fields in the MSmerge_contents table to work out which columns have changed in a particular row in my database.


You can use sp_showlineage and sp_showcolv to inspect the lineage and columns that have been changed. The sp_showcolv results contain a column, colidx, which is the index of the column(s) that were changed for a given version of the row.

If you need to take a more proactive approach, you can setup an auditing scheme. I've provided an example of how to setup an auditing scheme on my blog: http://www.sqlrepl.com/sql-server/auditing-changes-in-merge-replication/

  • Auditing scheme. Yeah that might be necessary too. Very handy. – peter Nov 2 '12 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.