Groups | Blog | Home
all groups > sql server replication > february 2006 >

sql server replication : Determine sequence of transactions in replication


Mike Mullane
2/28/2006 9:09:29 AM
I am running transactional replication with a push transformable
subscription. I am running into a PK error. After researching the error I
have found two transactions tied to record in the subscription database. So I
use the following to determine which transaction is getting fired first.

select * from distribution.dbo.MSrepl_commands
where publisher_database_id = 29
and article_id = 30
and xact_seqno = 0x0000235000000EFA000100000000

This returns a list of 58 transactions with the command_id and the command.
But I am unable to determine what the command is because it is not readable.
If I use

distribution.dbo.Sp_browsereplcmds

it gives me the command but not the command_id (sequence number).

How can I determine what the sequence of transactions is and read the
command?

Paul Ibison
2/28/2006 5:28:34 PM
Mike,
the code in sp_browsereplcmds is not too difficult. You could create your
own custom script using this as a template, but which includes the
command_id.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

AddThis Social Bookmark Button