Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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/

share|improve this answer
    
Auditing scheme. Yeah that might be necessary too. Very handy. –  peter Nov 2 '12 at 3:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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