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

sql server replication : Transaction Replication Question


Nitin
2/28/2005 10:47:03 AM
I have transaction replication set up and I want to set up a report to check
whether or not my replicaiton is up and runninr. Can someone suggest the kind
of queries I can run in Publisher, Distributor and Subscriber to check if
Replication is up and runnin or not.

Thanks in advance.

Hilary Cotter
2/28/2005 3:24:51 PM
query msrepl_errors in the distribution database on the publisher. If you
are doing a pull subscription query msrepl_errors in the distribution
database on the subscriber.

You can also query the status column of like this:

select name,
MSdistribution_history.agent_id, case when runstatus=1 then 'starting' when
runstatus=2 then 'succeed'
when runstatus=3 then 'running' when runstatus=4 then 'Idle' when
runstatus=5 then 'retry' when runstatus=6 then 'failed' end,max_start_time
from MSdistribution_history join (select agent_id,
Max_Start_Time=max(start_time) from msdistribution_history group by
agent_id) as thyme
on (msdistribution_history.agent_id=thyme.agent_id and
MSdistribution_history.start_time=Max_Start_Time)
join msdistribution_agents on
msdistribution_agents.id=MSdistribution_history.agent_id and start_time=
Max_Start_Time


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

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

[quoted text, click to view]

AddThis Social Bookmark Button