title: Where Merge Replication actually stores data?
body: <p>I've read some non-official articles that say merge replication actually stores data as transactions and replicate them as transactions. But no official info about that on MSDN or any kind of official sources I could reach.</p>
  
  <p>Please, can someone make it clear for me? If it stores transactions - is there any link in <code>MSMerge_contents</code> to the corresponding transaction? How come that it filters inserts/updates/deletes as it said <a href="https://support.microsoft.com/en-us/help/307356/how-to-understand-merge-replication-article-processing-order" rel="nofollow noreferrer">here</a>?</p>
  
  <p>If it does not replicate transactions, where it stores actual data for replication?</p>
  
  <p><strong>In my own opinion</strong> Merge Replication does not use transaction log to store data.</p>
  
  <p>Table triggers (MSmerge triggers) transforms each transaction in incremental generation information and stores that information in system metadata tables MSmerge_contents, MSmerge_tombstone and MSmerge_genhistory where you can join each table by tablenick and use rowguid column to find row (for MSmerge_contents and MSmerge_tombstone). </p>
  
  <p>Replication Agent compares contents of MSmerge_contents for publisher and subscriber, it copy new rows and change existing depending on rowguid column and generation number of each row. It uses actual rows in actual tables, joining by rowguid. 
  Same thing for MSmerge_tombstone table.</p>
  
  <p>It does not use transaction log. It also does not even have Log Reader active.</p>