After troubleshooting query time out error I would like to restart my distributor agent.
So I go to my distributor server, in my distributor DB (called distribution_SA) I run the following query:
select s.name as [servername],
d.name,
d.publication
,s.*
--d.publication, d.local_job, d.publisher_db, d.job_id, s.name
from distribution_SA.dbo.MSdistribution_agents d
inner join master.sys.servers s on d.subscriber_id = s.server_id
--where d.publication = @publisher
order by d.publication, s.name
this gives me the following result (I had to leave the server names on, apologies): What I want to achieve is the list of jobs that I need to restart in order for the changes that I did on my distributor agent profile to take place.
The problem is that I haven't been able to find these jobs. Where are them?
a) on the distributor
b) on the publisher
c) on the subscriber
Is there any better way of restarting the distributor agent?
I would prefer a T-SQL solution, when possible.