Gopal, Paul
did you guys try to run this command yourself? It always produces the same
output which i can not immagine would be a list of not distributed
transactions in a queue.
I am familiar with an architecture of replication for many years already on
Sybase and sql server.
What i think is that one has to be able to browse queue generaly and see the
size of the queue, being able to list transactions in a queue and see how it
is moving.
I am not sure what you refer to when you say you say that something is
exposed in replication monitor. There is nothing in replication monitor. All
you can do is insert trace. In case of high latency it does not help. One
still does not know how big it is and whether it's moving. I agree with you
about counters - this is the only what's left but it is a metric. If I wanted
to present it to my users as a proof, they may not be convinced since the
most intuitive thing would be the list of not replicated transactions in sql
terms. I will try the command you gave me.
Hopefully, you understand my task: i want to see:
1. list of not distributed yet commands in a queue.
2. Hoping that this list is dynamic, i would be able to see how many
transactions coming in and out.
Thanks anyway.
Post by Gopal Ashok [MSFT]Like paul mentioned, Msrepl_commands is the queue of transactions read from
the log that is then delivered to the subscriber by the distribution agent.
Im assuming you are on SQL Server 2005. You should first determine whether
the latency is infact due to a slow distribution agent or the log reader
agent using tracer token. You can run sp_replmonitorsubscriptionpendingcmds
to determine how many pending commands are there to be replicated for a
particular subscriber. BTW this is exposed through replication monitor.
I'm not sure what you are trying to determine here, but what you need to
understand is the throughput of the agents in cmds\sec. That along with the
length of the queue will give you the approximate catch up time, which again
is displayed in the 2005 monitor.
slow down of distribution agent is typically due to the fact that the
subscriber side is not able to apply changes fast enough.
Post by Gene.Paul, i looked through MSrepl_commands table. That's what i beleive this
proc is based on. I am not sure what it shows, may be command which is used
by rep agent.
It's not what i am looking for.
I am looking for queue which is definately exists in a replication. May be
internaly. I am looking to relate latency to this queue.
Now, it could not understand your reference to dbcc inputbuffer. What it has
to do with replication? Distribution process comes and goes. Does not stay as
open process with changing content. And i do not see how it could help to the
task of evaluation of not replicated yet transactions.
Sorry.
Post by Paul IbisonFor normal transactional you can use sp_browsereplcmds and in the case of a
queued subscriber use sp_replqueuemonitor . Then you can use DBCC INPUTBUFFER
on the subscriber to see where abouts you are up to.
Alternatively, use this to get the timestamp of the latest command to be
select transaction_timestamp
from subscriberdatabasename..MSreplication_subscriptions
Then run this in the distribution database (replace the value with the one
returned from above:)
HTH,
Paul Ibison, www.replicationanswers.com