Re: Monitoring & Starting Distribution Agent thru program

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Plan
Here is the way am proceeding. First am gonna write a trigger on
MSdistribution_history table to check for errors
If any error occurs, then a COM object is called to delete MSREPL7 table
created in oracle database
Is this a reliable solution to proceed with.

Also how can a distribution agent be restarted within a trigger

Any help would be great


"Paul Ibison" wrote:

> Kumaresh,
>
> this will give you any replication errors in the last 24 hours for a
> specific replication job. It hope it's OK for your purposes.
>
> SELECT DISTINCT
> MSdistribution_agents.name,
> MSdistribution_history.runstatus, MSdistribution_history.error_id,
> MSdistribution_history.start_time,
> MSdistribution_history.comments
> FROM MSdistribution_agents INNER JOIN
> MSdistribution_history ON MSdistribution_agents.id =
> MSdistribution_history.agent_id INNER JOIN
> MSrepl_errors ON MSdistribution_history.error_id =
> MSrepl_errors.id
> WHERE (MSdistribution_agents.name =
> N'PC-TEMPLATE-Northwind-PC-TEMPLATE-2') AND
> (MSdistribution_history.start_time BETWEEN DATEADD(dd, - 1, GETDATE()) AND
> GETDATE())
>
> Rgds,
>
> Paul Ibison
>
>
>
.



Relevant Pages