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