sp_replcmds (version 6.5)

Treats the first client who runs sp_replcmds within a given database as the logreader. Clients who attempt to run sp_replcmds within the same database receive error 18752 until the first client disconnects. After the first client disconnects, another client can run sp_replcmds and becomes the new logreader.

For additional syntax information for sp_replcmds, see the Microsoft SQL Server Transact-SQL Reference.

Remarks

This procedure can generate commands for owner-qualified tables or not qualify the table name (the default). Adding qualified table names allows replication of data from tables owned by a specific user in one database to tables owned by the same user in another database.

Note Because the table name in the source database will be qualified by the owner name, the owner of the table in the target database must be the same owner name.

The error message 18752 is:

Msg 18752, Level 16, State 1, Server <SERVERNAME>, Line 1
Another logreader is replicating the database
  

Note The sp_replcmds procedure should be run only to troubleshoot problems with replication.

A warning message number 18759 will be added to both the SQL Server error log and the Windows NT Event Log if sp_replcmds is unable to replicate a text command because the text pointer was not retrieved in the same transaction. The 18759 error message text is: Unable to replicate a text command because the corresponding TEXTPTR was not found in the replicated transaction (%ld, %ld).

For more information about distribution processes, see the Microsoft SQL Server Administrator's Companion.