all groups > sql server replication > december 2004 >
You're in the

sql server replication

group:

Find out transactions not replicated


Find out transactions not replicated SP
12/13/2004 3:45:46 AM
sql server replication:
Hi,

I have set up a transactional replication with Publisher,
Distributor and Subscriber on diff servers.

I want to find out (if any) transactions that have not
been replicated from publisher to distributor , and from
distributor to subscriber.

Can you tell me which tables / sprocs I can use to find
this info.

Thank you
Find out transactions not replicated Paul Ibison
12/13/2004 4:17:38 AM
For a standard TR, sp_browsereplcmds is what you need to
see the commands waiting at the distributor to go to the
subscriber. Have they already been distributed? If there
are no anonymous subscribers and the distribution cleanup
agent has just run, these are the remaining commands to
be replicated.
sp_replshowcmds is the corresponding command to read the
transaction log and find the commands waiting to be read
by the log reader (only one log-reader is allowed at
once).
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Re: Find out transactions not replicated Hilary Cotter
12/13/2004 8:14:21 AM
use the view MS_distributionstatus to figure out how many commands have to
be replicated; have a look at the UndelivCmdsInDistDB column. You can find
this view in the distribution database.

To get an idea of the commands remaining in the distribution database do
this.

1) connect to your subscriber and query this table.

declare @varbinary varbinary(300)
select @varbinary=transaction_timestamp From MSreplication_subscriptions
print @varbinary

2) with the value for varbinary paste it into the below query - this are the
command waiting to be applied
use distribution
--select From msrepl_transactions where xact_seqno =@varbinary
exec sp_browsereplcmds @xact_seqno_start ='0x0001BD2A000055990010'


--
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html

[quoted text, click to view]

AddThis Social Bookmark Button