0

I am facing a problem regarding SQL Log Reader Agent. Whenever, I start SQL Server Agent, Log Reader Agent does not start. I have to start manually.

  1. Do I have start Log Reader Agent manually every time?
  2. How can I start Log Reader Agent via T-SQL?

enter image description here

enter image description here

1

Do I have start Log Reader Agent manually every time?

That depends - what schedule is attached to the log reader agent job? The log reader agent runs as a SQL Server Agent job and typically is assigned a schedule to start when SQL Server Agent starts. This schedule might be disabled or deleted hence why you're having to start it manually.

How can I start Log Reader Agent via T-SQL?

You need to start the SQL Agent job. First, get the name of the job, then add it to this script and execute it:

EXEC msdb..sp_start_job @job_name = '<lo reader agent job name goes here>';

This shouldn't be necessary though, you just need to find and fix the problem with the schedule for this agent.

NOTE: To get the name of the job, the simplest way is to open Job Activity Monitor and look in the Category column for Repl-Log Reader.

  • Thanks for the answer. It helped me. I checked schedule. It is already set to "start when SQL Server Agent starts". Any other suggestions, why it does not start automatically? – Muhammad Ali Khamis Jun 3 at 16:45
  • Are there any errors in the log? – HandyD Jun 4 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.