O'Reilly logo

Guru's Guide to SQL Server Architecture and Internals, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required