7

I am using the SQL Server Agent to run some jobs every day, but the problem is that whenever the server (the machine itself) is restarted, the SQL Server Agent doesn't automatically start when the computer boots back up again...and I have to start it manually myself.

How can I set the Server Agent to Auto-Start after a computer restart?
Is there a particular Windows Service I need to set as auto-start ?

4
  • Why are you restarting the server? Aug 11, 2009 at 11:33
  • An update caused the server to restart Aug 11, 2009 at 12:21
  • This is a good thing to monitor - make sure those agents are up!
    – Sam
    Aug 14, 2009 at 1:30
  • Did you ever find a solution for this?
    – Rob
    Jan 15, 2013 at 14:57

6 Answers 6

9

Run services.msc, go to SQL SERVER AGENT service and set it on automatic start-up type

You can do the same thing by accessing sql server configuration manager that should be located in start/programs/microsoft sql server/configuration tools.

2
  • I just checked and the SQLSERVERAGENT job and it's already set to Automatic Aug 11, 2009 at 9:20
  • 2
    The check the event logs to find out what happened. Aug 11, 2009 at 9:29
4
  1. Check/ reset the user account that SQL Server Agent is using through SQL Server Configuration Manager (don't use services.msc) This will ensure correct permissions on files.
  2. Check the Windows event log for any errors
  3. Check the SQLAGENT.OUT file for any errors
  4. Open SSMS and ensure that your MSDB database is there & functional
3
  1. Run Program: SQL Server Configuration Manager
  2. click on SQL Server Services.
  3. Right Click on SQL Server Agent and click on Properties.
  4. click on Service tab and set Start Mode = Automatic.
1

If you have it set to automatic after you reboot the server, do you get a popup box that says "A service did not start....." ?

If it is set to automatic, it should start and if it doesn't, or fails it will log it.

If something else is stopping it, that would also be logged.

Take a look in your Event log (right click my computer --> manage) Then in the Event log select system. Go though these just after your reboot and see if anything mentions the SQL Agent. It should show it starting then failing or stopping and "hopefully" why.

From there, google the message or post it here.

1

This is a known circumstance to us with multiple versions of SQL Server, 2000, 2005, 2008 and I've concluded it's a bug. We do monthly Windows patching on servers with about 50 instances, and typically we will have two or three which fail to restart the SQL Agent. We also experience rare and random instances of SQL Agent stopping even without server reboots. Typically there is no evidence in the error log or the agent log. It just stops.

We have an SSIS package we developed to monitor servers and collect, centralize, and report Windows and SQL Server status info, space, size, growth,job failures, missing backups, security and config changes, etc. One of it's features is to report status of all SQL Agent services.

-2

It's possible that the service may start and then stop if it detects that it has no works to do. An alternative option would be to NET START it just before your daily job kicks in (I would do this anyway so as to ensure that it's up).

4
  • so u mean that I should set a schedule that net starts the job before the sql jobs start running ? Aug 11, 2009 at 10:01
  • ...windows schedule, ie Aug 11, 2009 at 10:02
  • 4
    The SQL Agent should start and remain running. Its not a service that stops on it's own. Aug 11, 2009 at 12:24
  • Agree with SpaceManSpiff (great name, btw!). I've never seen the agent stop itself with no work to do. It should sit there waiting for you to tell it to do something.
    – squillman
    Aug 11, 2009 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .