The MSrepl_commands Table
Each modification to a published table causes the Log Reader Agent to write at least one row to MSrepl_commands. Unlike snapshot replication, you can't simply cast the command column in MSrepl_commands as an nvarchar(512) and return human-readable text for transactional replication commands, so you'll want to use sp_browsereplcmds instead.
Understand that, just as a single T-SQL command may cause multiple entries to be written to the transaction log, so can a single T-SQL command cause the Log Reader Agent to write multiple entries to MSrepl_commands. If you have, say, a T-SQL UPDATE statement that affects 10,000 rows, you'll get at least 10,000 entries in MSrepl_commands. The same is true for DELETE commands—if a single ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access