April 25, 2005 at 7:29 am
All commands that gets executed in replication is stored in MSrepl_commmands and transactions in MSRepl_transactions.Is there a way to identify transactions that are completed verses the ones
which are pending. any solution will be greatly appreciated.
TIA
April 26, 2005 at 1:40 am
That information lives in the MSdistribution_history table. If you run the SQL below in the distribution database (after entering your publisher and subscriber database names), it will list the next transaction to be replicated. Any entry with an xact_seqno less than that has already been replicated.
declare @agent_id int
--tailor the publisher and subscriber db below
select @agent_id = id from msdistribution_agents where publisher_db = 'xxxxxx' and subscriber_db = 'xxxxxx'
--finds the transaction about to be replicated
set rowcount 1
select xact_seqno
from MSdistribution_history
where
agent_id = @agent_id and
xact_seqno <> 0x0
order by timestamp DESC
set rowcount 0
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply