The sp_replcmds Procedure

The Log Reader Agent uses the extended procedure sp_replcmds (implemented internally by SQL Server) to retrieve the log records produced by DML statements in the published database's transaction log. Each publisher database participating in transactional replication will have just one Log Reader Agent regardless of how many transactional publications it contains.

The first client that calls sp_replcmds for a database is considered the log reader for that database until it disconnects. Other clients attempting to run sp_replcmds before the first client disconnects will receive an error stating that “Another log reader is replicating the database.”

One reason that only one Log Reader Agent is permitted for each database ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.