Simon's SQL

SQL,DBA,tuning,Trouble Shooting,Performance

Replication status check

Posted by Simon Cho on 08/16/2011

, rm.publication as pub_name
, rm.publisher_db as pub_db
, a.publisher_database_id as pub_db_id
, a.subscriber_db as sub_db
, comments
, h.time
, isnull(rm.cur_latency, 0) as cur_latency
, as pub_srv
, as sub_srv
distribution_svg011.dbo.msdistribution_agents a with(nolock)
join distribution_svg011.dbo.MSreplication_monitordata rm with(nolock) on
join master.sys.servers pub_srv with(nolock) on a.publisher_id = pub_srv.server_id
join master.sys.servers sub_srv with(nolock) on a.subscriber_id= sub_srv.server_id
cross apply
select top 1 *
From distribution_SVG011.dbo.msdistribution_history with(nolock)
order by timestamp desc
) h
order by pub_db, pub_name

One Response to “Replication status check”

  1. simonsql said

    Usually, token based check it best.
    But, this case you can really quick check current status.


Leave a Reply to simonsql Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s