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

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